-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix blob parameters binding. Fixes: #73087, #61183, #71494 #2183
Conversation
case SQL_BLOB: | ||
case SQL_BLOB: { | ||
if (Z_TYPE_P(parameter) == IS_NULL) { | ||
// Check if this field allow NULL values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use C style comments.
RECORD_ERROR(stmt); | ||
result = 0; | ||
break; | ||
} | ||
put_cnt += chunk_size; | ||
} | ||
|
||
zval_dtor(param); | ||
if (Z_TYPE_P(param) != IS_STRING) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use curly brackets as well, see http://git.php.net/?p=php-src.git;a=blob_plain;f=CODING_STANDARDS;hb=HEAD .
Thanks.
A test is requiered, please add one based on a snippets from tickets. Thanks. |
Added test case to reproduce bug #73087 |
Merged via 3d73f71. Thanks! |
Anatol, please close also #61895. |
Fixed by this pull request php/php-src#2183 Thanks to @madorin
Please review someone more initiated in PHP, PDO code.
This fix an old frustrating bug in blob param binding.
Also include proper handling when NULL is passed.