diff options
| author | Christopher Jones <sixd@php.net> | 2009-02-05 21:43:31 +0000 |
|---|---|---|
| committer | Christopher Jones <sixd@php.net> | 2009-02-05 21:43:31 +0000 |
| commit | 8cf010352c744d9d4b665f26fe02d0450ce554dc (patch) | |
| tree | ab9259cd81d3585263628ae050ac44af57468b26 /ext/oci8/oci8_interface.c | |
| parent | 4df0de83e89b9ecd1792c2526589f3fca05d0ecb (diff) | |
| download | php-git-8cf010352c744d9d4b665f26fe02d0450ce554dc.tar.gz | |
Tweak fix for #45458 to allow this branch (from PECL) to continue building with PHP 4 et al. No other branches need changing
Diffstat (limited to 'ext/oci8/oci8_interface.c')
| -rw-r--r-- | ext/oci8/oci8_interface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index c8a4ca21c6..3dba5f2330 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -1399,7 +1399,13 @@ PHP_FUNCTION(oci_fetch_all) if (flags & PHP_OCI_NUM) { zend_hash_next_index_insert(Z_ARRVAL_P(row), &element, sizeof(zval*), NULL); } else { /* default to ASSOC */ +#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5) + /* zend_symtable_update is only available in 5.2+ */ zend_symtable_update(Z_ARRVAL_P(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL); +#else + /* This code path means Bug #45458 will remain broken when OCI8 is built with PHP 4 */ + zend_hash_update(Z_ARRVAL_P(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL); +#endif } } @@ -1431,7 +1437,13 @@ PHP_FUNCTION(oci_fetch_all) MAKE_STD_ZVAL(tmp); array_init(tmp); +#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5) + /* zend_symtable_update is only available in 5.2+ */ zend_symtable_update(Z_ARRVAL_P(array), columns[ i ]->name, columns[ i ]->name_len+1, (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); +#else + /* This code path means Bug #45458 will remain broken when OCI8 is built with PHP 4 */ + zend_hash_update(Z_ARRVAL_P(array), columns[ i ]->name, columns[ i ]->name_len+1, (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); +#endif } } |
