Skip to content

Commit

Permalink
Fixed regression with zephir_preg_match
Browse files Browse the repository at this point in the history
Closes: #1944
Fixes: #1940

Refs:
- 0922dad
  • Loading branch information
sergeyklay committed Oct 4, 2019
1 parent e9a00c4 commit 9be0236
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Fixed
- Fixed regression introduced in `0.12.5` for those users who doesn't use
bundled `ext/pcre/php_pcre.h` [#1944](https://github.com/phalcon/zephir/issues/1944)

## [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)
bundled `ext/json/php_json.h` [#1940](https://github.com/phalcon/zephir/issues/1940)

## [0.12.5] - 2019-10-02
### Changed
Expand Down
30 changes: 11 additions & 19 deletions kernels/ZendEngine3/string.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
/*
+------------------------------------------------------------------------+
| Zephir Language |
+------------------------------------------------------------------------+
| Copyright (c) 2011-2017 Zephir Team (http://www.zephir-lang.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file docs/LICENSE.txt. |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send an email |
| to license@zephir-lang.com so we can send you a copy immediately. |
+------------------------------------------------------------------------+
| Authors: Andres Gutierrez <andres@zephir-lang.com> |
| Eduar Carvajal <eduar@zephir-lang.com> |
| Vladimir Kolesnikov <vladimir@extrememember.com> |
+------------------------------------------------------------------------+
*/
* This file is part of the Zephir.
*
* (c) Zephir Team <team@zephir-lang.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. If you did not receive
* a copy of the license it is available through the world-wide-web at the
* following url: https://docs.zephir-lang.com/en/latest/license
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
Expand Down Expand Up @@ -1114,8 +1106,8 @@ void zephir_preg_match(zval *return_value, zval *regex, zval *subject, zval *mat
zval rv, tmp_matches;
zval *rvp = return_value ? return_value : &rv;

ZEPHIR_INIT_VAR(&tmp_flags);
ZEPHIR_INIT_VAR(&tmp_offset);
ZEPHIR_NULL(&tmp_flags);
ZEPHIR_NULL(&tmp_offset);

ZVAL_LONG(&tmp_flags, flags);
ZVAL_LONG(&tmp_offset, offset);
Expand Down

0 comments on commit 9be0236

Please sign in to comment.