Doc->Bug #52003 [Opn]: Incorrect PDOStatement::execute() signature
| From: | kalle@php.net | Date: | Tue, 19 Oct 2010 05:07:17 +0000 |
| Subject: | Doc->Bug #52003 [Opn]: Incorrect PDOStatement::execute() signature | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-155317@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52003&edit=1
ID: 52003
Updated by: kalle@php.net
Reported by: v1d4l0k4 at gmail dot com
Summary: Incorrect PDOStatement::execute() signature
Status: Open
-Type: Documentation Problem
+Type: Bug
-Package: Documentation problem
+Package: PDO related
Operating System: Irrelevant
PHP Version: Irrelevant
-Assigned To:
+Assigned To: pierrick
Block user comment: N
New Comment:
Pierrick, why don't you commit that patch the src? And add a changelog
entry if reasonable for PDOStatement::execute() :)
Previous Comments:
------------------------------------------------------------------------
[2010-06-06 06:13:42] pierrick@php.net
The following patch has been added/updated:
Patch Name: ZEND_ARG_ARRAY_INFO
Revision: 1275797622
URL:
http://bugs.php.net/patch-display.php?bug=52003&patch=ZEND_ARG_ARRAY_INFO&revision=1275797622
------------------------------------------------------------------------
[2010-06-05 22:53:10] v1d4l0k4 at gmail dot com
Description:
------------
Manual says PDOStatement::execute() signature is:
bool PDOStatement::execute ([ array $input_parameters = array() ] )
But in fact it is:
bool PDOStatement::execute ([ $input_parameters = null ] )
Test script:
---------------
<?php
class DBStatement extends PDOStatement
{
public function execute(array $input_parameters = array())
{
return parent::execute($input_parameters);
}
}
$PDO = new PDO('mysql:host=127.0.0.1', 'root', '');
$PDO->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('DBStatement'));
Expected result:
----------------
No errors
Actual result:
--------------
Strict Standards: Declaration of DBStatement::execute() should be
compatible with that of PDOStatement::execute() in
/media/ext/Web/htdocs/test/bug.php on line 9
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52003&edit=1