|
27 | 27 | #include "pdo/php_pdo_driver.h"
|
28 | 28 | #include "php_pdo_mysql.h"
|
29 | 29 | #include "php_pdo_mysql_int.h"
|
30 |
| -#include "zend_interfaces.h" |
31 | 30 |
|
32 | 31 | #ifdef PDO_USE_MYSQLND
|
33 | 32 | # define pdo_mysql_stmt_execute_prepared(stmt) pdo_mysql_stmt_execute_prepared_mysqlnd(stmt)
|
@@ -491,14 +490,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
|
491 | 490 | case IS_DOUBLE:
|
492 | 491 | mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_DOUBLE);
|
493 | 492 | break;
|
494 |
| - case IS_OBJECT: |
495 |
| - if(zend_class_implements_interface(Z_OBJCE_P(parameter), zend_ce_stringable)) { |
496 |
| - mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_VAR_STRING); |
497 |
| - break; |
498 |
| - } |
499 |
| - ZEND_FALLTHROUGH; |
500 | 493 | default:
|
501 |
| - pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a scalar value or null"); |
502 | 494 | PDO_DBG_RETURN(0);
|
503 | 495 | }
|
504 | 496 |
|
@@ -538,19 +530,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
|
538 | 530 | b->buffer = &Z_DVAL_P(parameter);
|
539 | 531 | PDO_DBG_RETURN(1);
|
540 | 532 |
|
541 |
| - case IS_OBJECT: |
542 |
| - if(zend_class_implements_interface(Z_OBJCE_P(parameter), zend_ce_stringable)) { |
543 |
| - convert_to_string(parameter); |
544 |
| - b->buffer_type = MYSQL_TYPE_STRING; |
545 |
| - b->buffer = Z_STRVAL_P(parameter); |
546 |
| - b->buffer_length = Z_STRLEN_P(parameter); |
547 |
| - *b->length = Z_STRLEN_P(parameter); |
548 |
| - PDO_DBG_RETURN(1); |
549 |
| - } |
550 |
| - ZEND_FALLTHROUGH; |
551 |
| - |
552 | 533 | default:
|
553 |
| - pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a scalar value or null"); |
554 | 534 | PDO_DBG_RETURN(0);
|
555 | 535 | }
|
556 | 536 | #endif /* PDO_USE_MYSQLND */
|
|
0 commit comments