From f68f8e1b16cf4175d7c8d2e7850cf0974d3b0258 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 3 Oct 2019 01:35:31 +0300 Subject: [PATCH 1/5] Fixed change log --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab90601e81..1415f79396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). [#1934](https://github.com/phalcon/zephir/issues/1934), [phalcon/cphalcon#14426](https://github.com/phalcon/cphalcon/issues/14426) -### Fixed ## [0.12.4] - 2019-09-22 +### Fixed - Fixed install template ## [0.12.3] - 2019-09-22 From c82fa4b1036d4e50883df0e05ecbbcbf1298a05d Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 3 Oct 2019 01:35:58 +0300 Subject: [PATCH 2/5] Bump version --- Library/Zephir.php | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Zephir.php b/Library/Zephir.php index 34eb5adfa8..92651b8e98 100644 --- a/Library/Zephir.php +++ b/Library/Zephir.php @@ -16,7 +16,7 @@ */ final class Zephir { - const VERSION = '0.12.5-$Id$'; + const VERSION = '0.12.6-$Id$'; const LOGO = <<<'ASCII' _____ __ _ diff --git a/appveyor.yml b/appveyor.yml index 61735404ce..839f41ab4a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.12.5-{build} +version: 0.12.6-{build} environment: matrix: From 99f41ba084c5c454fda9421bea77eaf904c8ba3e Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 3 Oct 2019 01:37:33 +0300 Subject: [PATCH 3/5] Regenerate C code --- ext/php_test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/php_test.h b/ext/php_test.h index b48526ed45..2bd63c22e9 100644 --- a/ext/php_test.h +++ b/ext/php_test.h @@ -14,7 +14,7 @@ #define PHP_TEST_VERSION "1.0.0" #define PHP_TEST_EXTNAME "test" #define PHP_TEST_AUTHOR "Zephir Team and contributors" -#define PHP_TEST_ZEPVERSION "0.12.5-$Id$" +#define PHP_TEST_ZEPVERSION "0.12.6-$Id$" #define PHP_TEST_DESCRIPTION "Description test for
Test Extension." typedef struct _zephir_struct_db { From f90a4cf73104d3e7d7b1ce33a24da1ed54b95269 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 3 Oct 2019 23:14:47 +0300 Subject: [PATCH 4/5] Fixed ZEPHIR_METHOD_GLOBALS_PTR call --- kernels/ZendEngine3/string.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/kernels/ZendEngine3/string.c b/kernels/ZendEngine3/string.c index 1c5f3e92d6..74fcfdcba6 100644 --- a/kernels/ZendEngine3/string.c +++ b/kernels/ZendEngine3/string.c @@ -402,10 +402,8 @@ static void zephir_append_printable_zval(smart_str *implstr, zval *tmp) void zephir_append_printable_array(smart_str *implstr, const zval *value) { - - zval *tmp; - zend_array *arr; - unsigned int numelems, i = 0; + zend_array *arr; + unsigned int numelems; arr = Z_ARRVAL_P(value); numelems = zend_hash_num_elements(arr); @@ -413,6 +411,8 @@ void zephir_append_printable_array(smart_str *implstr, const zval *value) smart_str_appendc(implstr, '['); if (numelems > 0) { + zval *tmp; + unsigned int i = 0; ZEND_HASH_FOREACH_VAL(arr, tmp) { @@ -1191,7 +1191,7 @@ int zephir_json_encode(zval *return_value, zval *v, int opts) zval zopts; zval *params[2]; - ZEPHIR_INIT_VAR(&zopts); + ZEPHIR_NULL(&zopts); ZVAL_LONG(&zopts, opts); params[0] = v; @@ -1205,7 +1205,7 @@ int zephir_json_decode(zval *return_value, zval *v, zend_bool assoc) zval zassoc; zval *params[2]; - ZEPHIR_INIT_VAR(&zassoc); + ZEPHIR_NULL(&zassoc); ZVAL_BOOL(&zassoc, assoc); params[0] = v; @@ -1222,10 +1222,9 @@ void zephir_md5(zval *return_value, zval *str) unsigned char digest[16]; char hexdigest[33]; zval copy; - int use_copy = 0; if (Z_TYPE_P(str) != IS_STRING) { - use_copy = zend_make_printable_zval(str, ©); + int use_copy = zend_make_printable_zval(str, ©); if (use_copy) { str = © } @@ -1274,7 +1273,6 @@ void zephir_crc32(zval *return_value, zval *str) void zephir_ucfirst(zval *return_value, zval *s) { zval copy; - char *c; int use_copy = 0; if (UNEXPECTED(Z_TYPE_P(s) != IS_STRING)) { @@ -1286,8 +1284,8 @@ void zephir_ucfirst(zval *return_value, zval *s) if (!Z_STRLEN_P(s)) { ZVAL_EMPTY_STRING(return_value); - } - else { + } else { + char *c; ZVAL_STRINGL(return_value, Z_STRVAL_P(s), Z_STRLEN_P(s)); c = Z_STRVAL_P(return_value); *c = toupper((unsigned char)*c); @@ -1407,7 +1405,7 @@ void zephir_string_to_hex(zval *return_value, zval *var) res = zend_string_alloc(2*Z_STRLEN_P(var) + 1, 0); s = Z_STRVAL_P(var); for (i=0; ival + 2*i, "%hhX", s[i]); + sprintf(res->val + 2*i, "%hhX", (unsigned char) s[i]); } res->val[2*Z_STRLEN_P(var)] = 0; From 41259a9f9ca3b38a59a039fa6fc292e666cbd84c Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 3 Oct 2019 23:30:25 +0300 Subject: [PATCH 5/5] Added change log --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1415f79396..7177690114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [0.12.6] - 2019-10-03 +### Fixed +- Fixed regression introduced in `0.12.5` for those users who doesn't use + bundled `ext/json/php_json.h` [#1940](https://github.com/phalcon/zephir/issues/1940) + ## [0.12.5] - 2019-10-02 ### Changed - Update `zend_update_static_property` to be compatible with PHP >= 7.3 @@ -242,7 +247,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed casting resource to int (only ZendEngine 3) [#1524](https://github.com/phalcon/zephir/issues/1524) -[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.5...HEAD +[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.6...HEAD +[0.12.6]: https://github.com/phalcon/zephir/compare/0.12.5...0.12.6 [0.12.5]: https://github.com/phalcon/zephir/compare/0.12.4...0.12.5 [0.12.4]: https://github.com/phalcon/zephir/compare/0.12.3...0.12.4 [0.12.3]: https://github.com/phalcon/zephir/compare/0.12.2...0.12.3