diff options
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r-- | ext/pdo_sqlite/sqlite_driver.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index decc9dc438..346cdf2f27 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -301,8 +301,7 @@ static int pdo_sqlite_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val) switch (attr) { case PDO_ATTR_TIMEOUT: - convert_to_long(val); - sqlite3_busy_timeout(H->db, Z_LVAL_P(val) * 1000); + sqlite3_busy_timeout(H->db, zval_get_long(val) * 1000); return 1; } return 0; @@ -533,7 +532,7 @@ static PHP_METHOD(SQLite, sqliteCreateFunction) PDO_CONSTRUCT_CHECK; if (!zend_is_callable(callback, 0, &cbname)) { - php_error_docref(NULL, E_WARNING, "function '%s' is not callable", cbname->val); + php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(cbname)); zend_string_release(cbname); RETURN_FALSE; } @@ -603,13 +602,13 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate) PDO_CONSTRUCT_CHECK; if (!zend_is_callable(step_callback, 0, &cbname)) { - php_error_docref(NULL, E_WARNING, "function '%s' is not callable", cbname->val); + php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(cbname)); zend_string_release(cbname); RETURN_FALSE; } zend_string_release(cbname); if (!zend_is_callable(fini_callback, 0, &cbname)) { - php_error_docref(NULL, E_WARNING, "function '%s' is not callable", cbname->val); + php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(cbname)); zend_string_release(cbname); RETURN_FALSE; } @@ -663,7 +662,7 @@ static PHP_METHOD(SQLite, sqliteCreateCollation) PDO_CONSTRUCT_CHECK; if (!zend_is_callable(callback, 0, &cbname)) { - php_error_docref(NULL, E_WARNING, "function '%s' is not callable", cbname->val); + php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(cbname)); zend_string_release(cbname); RETURN_FALSE; } |