Home » Mail » Mail_Queue » Bug #2098
try() function of Body.php incompatible with PHP5
Details
| Submitted | 2004-08-10 00:17 UTC |
|---|---|
| From | troy at versiontwo dot com dot au |
| Assigned | quipo |
| Status | Closed |
| Package | Mail_Queue |
| PHP Version | 5.0.0 |
| OS | Fedora Core 2 |
| Roadmaps | (Not assigned) |
Comments
[2004-08-10 00:17 UTC] troy at versiontwo dot com dot au
Description:
------------
Pretty simple one this.
Just need to rename the try() function in the Queue/Body.php file. Last function (line 330).
This function name conflicts with the next error handling features of php5.
[2004-08-17 13:53 UTC] troy at versiontwo dot com dot au
I could only find a list of reserved words for php4. However, I can assure you that the following words are now reserved for php5: try, catch, throw, exception, public, private, protected, abstract, interface and final.
Example:
class TryTest {
private $value;
public function __construct($someValue) {
$this->try($someValue);
}
private function try($value) {
$this->value = $value;
}
}
$tt = new TryTest('Test');
Causes the following error:
Parse error: parse error, unexpected T_TRY, expecting T_STRING