Skip to content

Commit 3dc9503

Browse files
committed
Revert "Fixed GH-13167 Fixed the behavior of bindValue and bindParam. (#13384)"
This reverts commit 68f1050.
1 parent 00bee30 commit 3dc9503

File tree

2 files changed

+0
-101
lines changed

2 files changed

+0
-101
lines changed

ext/pdo_mysql/mysql_statement.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "pdo/php_pdo_driver.h"
2828
#include "php_pdo_mysql.h"
2929
#include "php_pdo_mysql_int.h"
30-
#include "zend_interfaces.h"
3130

3231
#ifdef PDO_USE_MYSQLND
3332
# 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
491490
case IS_DOUBLE:
492491
mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_DOUBLE);
493492
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;
500493
default:
501-
pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a scalar value or null");
502494
PDO_DBG_RETURN(0);
503495
}
504496

@@ -538,19 +530,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
538530
b->buffer = &Z_DVAL_P(parameter);
539531
PDO_DBG_RETURN(1);
540532

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-
552533
default:
553-
pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a scalar value or null");
554534
PDO_DBG_RETURN(0);
555535
}
556536
#endif /* PDO_USE_MYSQLND */

ext/pdo_mysql/tests/gh13384.phpt

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)