Bug #4940 [NEW]: Wrong syntax for the The Backwards compatibility set up in the documentation
| From: | xavier at atero dot com | Date: | Thu, 28 Jul 2005 23:07:18 +0000 |
| Subject: | Bug #4940 [NEW]: Wrong syntax for the The Backwards compatibility set up in the documentation | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6565@lists.php.net to get a copy of this message | ||
From: xavier at atero dot com
Operating system: Win32
PHP version: 4.4.0
Package: Documentation
Bug Type: Bug
Bug description: Wrong syntax for the The Backwards compatibility set up in the documentation
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);
?>
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=4940&edit=1
--