com php-src: Fix C89 compatibility by moving a misplaced if statement: Zend/zend_API.c
| From: | Dmitry Stogov | Date: | Wed, 18 Mar 2015 22:38:16 +0000 |
| Subject: | com php-src: Fix C89 compatibility by moving a misplaced if statement: Zend/zend_API.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85684@lists.php.net to get a copy of this message | ||
Commit: 78d2399493f4f1128cd98a9b60fb32f078f5f609
Author: Anthony Ferrara <ircmaxell@gmail.com> Wed, 18 Mar 2015 18:38:16 -0400
Parents: d8ef608f3dc33946b365a3b239b4fc4ad8fd913c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=78d2399493f4f1128cd98a9b60fb32f078f5f609
Log:
Fix C89 compatibility by moving a misplaced if statement
Changed paths:
M Zend/zend_API.c
Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index da0eca8..32888f1 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -840,15 +840,16 @@ ZEND_API int zend_parse_method_parameters(int num_args, zval *this_ptr, const
ch
zval **object;
zend_class_entry *ce;
- if (ZEND_CALL_INFO(EG(current_execute_data)) & ZEND_CALL_STRICT_TYPEHINTS) {
- flags |= ZEND_PARSE_PARAMS_STRICT;
- }
-
/* Just checking this_ptr is not enough, because fcall_common_helper does not set
* Z_OBJ(EG(This)) to NULL when calling an internal function with common..scope == NULL.
* In that case EG(This) would still be the $this from the calling code and we'd take the
* wrong branch here. */
zend_bool is_method = EG(current_execute_data)->func->common.scope != NULL;
+
+ if (ZEND_CALL_INFO(EG(current_execute_data)) & ZEND_CALL_STRICT_TYPEHINTS) {
+ flags |= ZEND_PARSE_PARAMS_STRICT;
+ }
+
if (!is_method || !this_ptr || Z_TYPE_P(this_ptr) != IS_OBJECT) {
RETURN_IF_ZERO_ARGS(num_args, p, flags);