Doc #63443 [Opn->Csd]: ErrorException __construct API changed between 5.2 and 5.3
| From: | aharvey@php.net | Date: | Tue, 06 Nov 2012 01:58:39 +0000 |
| Subject: | Doc #63443 [Opn->Csd]: ErrorException __construct API changed between 5.2 and 5.3 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9061@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63443&edit=1
ID: 63443
Updated by: aharvey@php.net
Reported by: benoit dot burnichon at airtag dot com
Summary: ErrorException __construct API changed between 5.2
and 5.3
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: aharvey
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2012-11-06 01:58:25] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=328246
Log: Add a changelog for ErrorException::__construct() noting the addition of the
$previous parameter.
Fixes doc bug #63443 (ErrorException __construct API changed between 5.2 and
5.3).
------------------------------------------------------------------------
[2012-11-05 16:49:22] benoit dot burnichon at airtag dot com
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 this bug report at https://bugs.php.net/bug.php?id=63443&edit=1