PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR » Bug #4940

Wrong syntax for the The Backwards compatibility set up in the documentation

Details

Doc Bug #4940Wrong syntax for the The Backwards compatibility set up in the documentation
Submitted2005-07-28 23:07 UTC
Fromxavier at atero dot com
Assignedcellog
StatusClosed
PackagePEAR
PHP Version4.4.0
OSWin32
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);
?>