diff options
Diffstat (limited to 'ext/phar/phar_object.c')
-rw-r--r-- | ext/phar/phar_object.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 11e5d5a7f1..1cfaee416f 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1423,7 +1423,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ if (!value) { /* failure in get_current_data */ - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned no value", ce->name->val); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned no value", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1434,7 +1434,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ php_stream_from_zval_no_verify(fp, value); if (!fp) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Iterator %v returned an invalid stream handle", ce->name->val); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Iterator %v returned an invalid stream handle", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1448,7 +1448,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ if (Z_TYPE(key) != IS_STRING) { zval_dtor(&key); - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ce->name->val); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1458,7 +1458,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ save = str_key; zval_dtor(&key); } else { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ce->name->val); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1472,7 +1472,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ spl_filesystem_object *intern = (spl_filesystem_object*)((char*)Z_OBJ_P(value) - Z_OBJ_P(value)->handlers->offset); if (!base_len) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Iterator %v returns an SplFileInfo object, so base directory must be specified", ce->name->val); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Iterator %v returns an SplFileInfo object, so base directory must be specified", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1516,7 +1516,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ } /* fall-through */ default: - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid value (must return a string)", ce->name->val); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid value (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1556,7 +1556,7 @@ phar_spl_fileinfo: } } else { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that is not in the base directory \"%s\"", ce->name->val, fname, base); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that is not in the base directory \"%s\"", ZSTR_VAL(ce->name), fname, base); if (save) { efree(save); @@ -1576,7 +1576,7 @@ phar_spl_fileinfo: if (Z_TYPE(key) != IS_STRING) { zval_dtor(&key); - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ce->name->val); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1586,13 +1586,13 @@ phar_spl_fileinfo: save = str_key; zval_dtor(&key); } else { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ce->name->val); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned an invalid key (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } } #if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that safe mode prevents opening", ce->name->val, fname); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that safe mode prevents opening", ZSTR_VAL(ce->name), fname); if (save) { efree(save); @@ -1607,7 +1607,7 @@ phar_spl_fileinfo: #endif if (php_check_open_basedir(fname)) { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that open_basedir prevents opening", ce->name->val, fname); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that open_basedir prevents opening", ZSTR_VAL(ce->name), fname); if (save) { efree(save); @@ -1624,7 +1624,7 @@ phar_spl_fileinfo: fp = php_stream_open_wrapper(fname, "rb", STREAM_MUST_SEEK|0, &opened); if (!fp) { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a file that could not be opened \"%s\"", ce->name->val, fname); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a file that could not be opened \"%s\"", ZSTR_VAL(ce->name), fname); if (save) { efree(save); @@ -3916,7 +3916,7 @@ PHP_METHOD(Phar, getStub) carry_on: buf = zend_string_alloc(len, 0); - if (len != php_stream_read(fp, buf->val, len)) { + if (len != php_stream_read(fp, ZSTR_VAL(buf), len)) { if (fp != phar_obj->archive->fp) { php_stream_close(fp); } @@ -3935,8 +3935,8 @@ carry_on: php_stream_close(fp); } - buf->val[len] = '\0'; - buf->len = len; + ZSTR_VAL(buf)[len] = '\0'; + ZSTR_LEN(buf) = len; RETVAL_STR(buf); } /* }}}*/ |