PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail_Queue » Bug #2098

try() function of Body.php incompatible with PHP5

Details

Submitted2004-08-10 00:17 UTC
Fromtroy at versiontwo dot com dot au
Assignedquipo
StatusClosed
PackageMail_Queue
PHP Version5.0.0
OSFedora 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