#45628 [NEW]: set_error_handler() return type wrongly documented
| From: | sebastian@php.net | Date: | Fri, 25 Jul 2008 14:24:53 +0000 |
| Subject: | #45628 [NEW]: set_error_handler() return type wrongly documented | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-1013@lists.php.net to get a copy of this message | ||
From: sebastian@php.net
Operating system: Irrelevant
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: set_error_handler() return type wrongly documented
Description:
------------
The documentation for set_error_handler() seems to be wrong:
<?php
function handler($errno, $errstr, $errfile, $errline, $errcontext) {}
var_dump(set_error_handler('handler'));
var_dump(set_error_handler('handler'));
NULL
string(7) "handler"
So NULL is not used for errors. NULL means the default error handler
here apparently. Whereas the documentation reads:
"Returns a string containing the previously defined error handler (if
any), or NULL on error. If the previous handler was a class method,
this function will return an indexed array with the class and the
method name."
The code reads:
"Returns the previously defined error handler, or false on error."
--
Edit bug report at http://bugs.php.net/?id=45628&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45628&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45628&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45628&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45628&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45628&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45628&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45628&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45628&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45628&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45628&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45628&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45628&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45628&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45628&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45628&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45628&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45628&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45628&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45628&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45628&r=mysqlcfg