mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Boolify PDO's set_attribute driver function
This commit is contained in:
parent
d04adf60be
commit
43f69160cf
8 changed files with 65 additions and 64 deletions
|
@ -295,19 +295,19 @@ static int pdo_sqlite_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int pdo_sqlite_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
|
||||
static bool pdo_sqlite_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
|
||||
{
|
||||
pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data;
|
||||
|
||||
switch (attr) {
|
||||
case PDO_ATTR_TIMEOUT:
|
||||
sqlite3_busy_timeout(H->db, zval_get_long(val) * 1000);
|
||||
return 1;
|
||||
return true;
|
||||
case PDO_SQLITE_ATTR_EXTENDED_RESULT_CODES:
|
||||
sqlite3_extended_result_codes(H->db, zval_get_long(val));
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue