Bug #4940 [Opn->Asn]: Wrong syntax for the The Backwards compatibility set up in the documentation

From: Date: Thu, 22 Sep 2005 07:33:55 +0000
Subject: Bug #4940 [Opn->Asn]: Wrong syntax for the The Backwards compatibility set up in the documentation
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6868@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=4940&edit=1 ID: 4940 Updated by: arnaud@php.net Reported By: xavier at atero dot com -Status: Open +Status: Assigned Id: 4940 Type: Bug Package: Documentation Operating System: Win32 PHP Version: 4.4.0 -Assigned To: +Assigned To: cellog New Comment: I partially fixed the documentation (the one but last example) but I am unsure about exception throwing when running under PHP5. Previous Comments: ------------------------------------------------------------------------ [2005-07-28 19:07:17] 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); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=4940&edit=1

« previous php.pear.doc (#6868) next »