Home » PEAR » PEAR » Bug #4940
Wrong syntax for the The Backwards compatibility set up in the documentation
Details
| Doc Bug #4940 | Wrong syntax for the The Backwards compatibility set up in the documentation |
|---|---|
| Submitted | 2005-07-28 23:07 UTC |
| From | xavier at atero dot com |
| Assigned | cellog |
| Status | Closed |
| Package | PEAR |
| PHP Version | 4.4.0 |
| OS | Win32 |
| Roadmaps | (Not assigned) |
Comments
[2005-07-28 23:07 UTC] xavier at atero dot com
Description:
------------
The Backwards compatibility with PEAR_Error, Forward compatibility with PHP 5 Exception (http://pear.php.net/manual/en/core.pear.pear-errorstack.intro.php) describes the call to automatically raise a PEAR_Error using PEAR::raiseError() as:
<?php
require_once 'PEAR/ErrorStack.php';
$stack = &PEAR_ErrorStack::singleton('mypackage', false, null, 'PEAR_ErrorStack', true);
?>
when the method PEAR_ErrorStack::singleton in the documentation has the following syntax:
PEAR_ErrorStack& PEAR_ErrorStack::singleton (string $package [, callback $msgCallback = FALSE [, callback $contextCallback = FALSE [, boolean $throwPEAR_Error = FALSE [, string $stackClass = 'PEAR_ErrorStack']]]])
Expected result:
----------------
<?php
require_once 'PEAR/ErrorStack.php';
$stack = &PEAR_ErrorStack::singleton('mypackage', false, false, true);
?>
Actual result:
--------------
<?php
require_once 'PEAR/ErrorStack.php';
$stack = &PEAR_ErrorStack::singleton('mypackage', false, null, 'PEAR_ErrorStack', true);
?>