summaryrefslogtreecommitdiff
path: root/ext/pdo/php_pdo_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo/php_pdo_driver.h')
-rw-r--r--ext/pdo/php_pdo_driver.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index 4818bc6232..8eed98952d 100644
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -194,13 +194,13 @@ enum pdo_null_handling {
};
/* {{{ utils for reading attributes set as driver_options */
-static inline long pdo_attr_lval(zval *options, enum pdo_attribute_type option_name, long defval TSRMLS_DC)
+static inline long pdo_attr_ival(zval *options, enum pdo_attribute_type option_name, long defval TSRMLS_DC)
{
zval *v;
if (options && (v = zend_hash_index_find(Z_ARRVAL_P(options), option_name))) {
- convert_to_long_ex(v);
- return Z_LVAL_P(v);
+ convert_to_int_ex(v);
+ return Z_IVAL_P(v);
}
return defval;
}
@@ -210,7 +210,7 @@ static inline char *pdo_attr_strval(zval *options, enum pdo_attribute_type optio
if (options && (v = zend_hash_index_find(Z_ARRVAL_P(options), option_name))) {
convert_to_string_ex(v);
- return estrndup(Z_STRVAL_P(v), Z_STRLEN_P(v));
+ return estrndup(Z_STRVAL_P(v), Z_STRSIZE_P(v));
}
return defval ? estrdup(defval) : NULL;
}