#45578 [Opn->Fbk]: Can't extend the bind_param method of mysqli_stmt class without errors
| From: | jani@php.net | Date: | Mon, 21 Jul 2008 16:08:49 +0000 |
| Subject: | #45578 [Opn->Fbk]: Can't extend the bind_param method of mysqli_stmt class without errors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127069@lists.php.net to get a copy of this message | ||
ID: 45578
Updated by: jani@php.net
Reported By: basilio dot vera at softonic dot com
-Status: Open
+Status: Feedback
Bug Type: MySQLi related
Operating System: Linux RH
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2008-07-21 10:02:16] basilio dot vera at softonic dot com
Description:
------------
Can't extend the method "bind_param" of the mysqli_stmt class without
strict errors.
Through reflection I see that the method declaration has one declared
and needed parameter:
-- Parameter #0: { Class: NULL Allows NULL: false Passed to by
reference: false Is optional?: no }
What can I do to avoid this notice?
Reproduce code:
---------------
class myTry1 extends mysqli_stmt
{
public function bind_param()
{
}
}
class myTry2 extends mysqli_stmt
{
public function bind_param( $types )
{
}
}
class myTry3 extends mysqli_stmt
{
public function bind_param( $types, $var1 )
{
}
}
class myTry4 extends mysqli_stmt
{
public function bind_param( $types, &$var1 )
{
}
}
Expected result:
----------------
No errors with at least one ot these new classes.
Actual result:
--------------
Strict Notice Declaration of myTry1::bind_param() should be compatible
with that of mysqli_stmt::bind_param() in...
Strict Notice Declaration of myTry2::bind_param() should be compatible
with that of mysqli_stmt::bind_param() in...
Strict Notice Declaration of myTry3::bind_param() should be compatible
with that of mysqli_stmt::bind_param() in...
Strict Notice Declaration of myTry4::bind_param() should be compatible
with that of mysqli_stmt::bind_param() in...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45578&edit=1