Doc #63443 [NEW]: ErrorException __construct API changed between 5.2 and 5.3

From: Date: Mon, 05 Nov 2012 16:49:23 +0000
Subject: Doc #63443 [NEW]: ErrorException __construct API changed between 5.2 and 5.3
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9059@lists.php.net to get a copy of this message
From: benoit dot burnichon at airtag dot com Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:ErrorException __construct API changed between 5.2 and 5.3 Description: ------------ --- From manual page: http://www.php.net/class.errorexception --- The __construct API of ErrorException has changed between 5.2 and 5.3. I could not find any mention of this in the online documentation. In the 5.2.17 code (current latest 5.2 branch tag), it could be found File Zend/zend_exceptions.c: <code class="C"> /* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno]]) ErrorException constructor */ ZEND_METHOD(error_exception, __construct) </code> The commit that modified the API is 2bf3bfc746f0f034ef9c443ae697b0c3f4b5d3dc which is contained in all 5.3.X tags. File: Zend/zend_exceptions.c <code class="diff"> @@ -158,8 +182,8 @@ ZEND_METHOD(error_exception, __construct) zval *object, *previous = NULL; int argc = ZEND_NUM_ARGS(), message_len, filename_len; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC, "|sllslO", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) { - zend_error(E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno ]]]]])"); + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) { + zend_error(E_ERROR, "Wrong parameters for ErrorException([string $exception [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Exception $previous = NULL]]]]]])"); } object = getThis(); </code> -- Edit bug report at https://bugs.php.net/bug.php?id=63443&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63443&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63443&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63443&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63443&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63443&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63443&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63443&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63443&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63443&r=support Expected behavior: https://bugs.php.net/fix.php?id=63443&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63443&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63443&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63443&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63443&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63443&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63443&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63443&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63443&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63443&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63443&r=mysqlcfg

« previous php.doc.bugs (#9059) next »