ID: 45578
User updated by: basilio dot vera at softonic dot com
-Summary: Can't extend the bind_param method of mysqli_stmt
class without errors
Reported By: basilio dot vera at softonic dot com
-Status: Feedback
+Status: Open
Bug Type: MySQLi related
Operating System: Linux RH
PHP Version: 5.2.6
Assigned To: fb-req-jani
New Comment:
After test it with the windows zip, I see "PHP Version => 5.2.7-dev"
with a phpinfo()...
I'm getting the same errors.
Strict Standards: Declaration of myTry1::bind_param() should be
compatible with that of mysqli_stmt::bind_param() in...
Strict Standards: Declaration of myTry2::bind_param() should be
compatible with that of mysqli_stmt::bind_param() in...
Strict Standards: Declaration of myTry3::bind_param() should be
compatible with that of mysqli_stmt::bind_param() in...
Strict Standards: Declaration of myTry4::bind_param() should be
compatible with that of mysqli_stmt::bind_param() in...
Previous Comments:
------------------------------------------------------------------------
[2008-07-21 16:08:49] [EMAIL PROTECTED]
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
------------------------------------------------------------------------
[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