Skip to content

Commit 339c847

Browse files
Remove use of removed function(ereg()) and remove unnecessary spaces.
1 parent 366b22a commit 339c847

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

ext/pdo_mysql/get_error_codes.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
while (!feof(STDIN)) {
77
$line = fgets(STDIN);
88

9-
if (ereg('^\{[[:space:]]+(ER_.*)[[:space:]]+,[[:space:]]*"(.*)",[[:space:]]*"(.*)"', $line, $matches)) {
9+
if (preg_match('^\{[[:space:]]+(ER_.*)[[:space:]]+,[[:space:]]*"(.*)",[[:space:]]*"(.*)"', $line, $matches)) {
1010
$codes[$matches[1]] = $matches[2];
1111
$maxlen = max($maxlen, strlen($matches[1]));
1212
}
@@ -23,6 +23,4 @@
2323
printf(" case %-{$maxlen}s: return \"%s\";\n", $code, $state);
2424
echo "#endif\n";
2525
}
26-
27-
2826
?>

ext/pdo_mysql/mysql_driver.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin
8181
dbh->is_persistent);
8282
} else {
8383
einfo->errmsg = pestrdup(
84-
"Cannot execute queries while other unbuffered queries are active. "
84+
"Cannot execute queries while other unbuffered queries are active. "
8585
"Consider using PDOStatement::fetchAll(). Alternatively, if your code "
8686
"is only ever going to run against mysql, you may enable query "
8787
"buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.",
@@ -269,7 +269,6 @@ static zend_long mysql_handle_doer(pdo_dbh_t *dbh, const zend_string *sql)
269269
pdo_mysql_error(dbh);
270270
PDO_DBG_RETURN(H->einfo.errcode ? -1 : 0);
271271
} else {
272-
273272
/* MULTI_QUERY support - eat up all unfetched result sets */
274273
MYSQL_RES* result;
275274
while (mysql_more_results(H->server)) {

ext/pdo_mysql/pdo_mysql.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ PHP_INI_BEGIN()
8888
STD_PHP_INI_ENTRY("pdo_mysql.default_socket", PDO_MYSQL_UNIX_ADDR, PHP_INI_SYSTEM, OnUpdateStringUnempty, default_socket, zend_pdo_mysql_globals, pdo_mysql_globals)
8989
#endif
9090
#if PDO_DBG_ENABLED
91-
STD_PHP_INI_ENTRY("pdo_mysql.debug", NULL, PHP_INI_SYSTEM, OnUpdateString, debug, zend_pdo_mysql_globals, pdo_mysql_globals)
91+
STD_PHP_INI_ENTRY("pdo_mysql.debug", NULL, PHP_INI_SYSTEM, OnUpdateString, debug, zend_pdo_mysql_globals, pdo_mysql_globals)
9292
#endif
9393
PHP_INI_END()
9494
/* }}} */
@@ -131,7 +131,6 @@ static PHP_MINIT_FUNCTION(pdo_mysql)
131131
#ifdef PDO_USE_MYSQLND
132132
mysqlnd_reverse_api_register_api(&pdo_mysql_reverse_api);
133133
#endif
134-
135134
return php_pdo_register_driver(&pdo_mysql_driver);
136135
}
137136
/* }}} */

0 commit comments

Comments
 (0)