#50546 [Bgs]: zend_parse_method_parameters_ex does not honour flags for procedural parameter

From: Date: Tue, 22 Dec 2009 09:09:52 +0000
Subject: #50546 [Bgs]: zend_parse_method_parameters_ex does not honour flags for procedural parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146014@lists.php.net to get a copy of this message
ID: 50546 User updated by: hp at oeri dot ch Reported By: hp at oeri dot ch Status: Bogus -Bug Type: Feature/Change Request +Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.2.12 New Comment: If you have a look at the function, it seems supposed to work in a PHP_FUNCTION which is called either a) on itself or b) as method of an object. It is used exactly like that numerous times, e.g. in the intl extension. It distinguishes those two cases, and handles both gracefully. HOWEVER, in one case (a) the flags given in the call are not forwarded to zend_parse_va_args. In the other case (b), it does. Testing alternative argument definitions does work in both cases, but DOES issue void warnings. Previous Comments: ------------------------------------------------------------------------ [2009-12-22 08:42:21] jani@php.net Maybe there's reason it's named zend_parse_METHOD_parameters_ex(). No idea what you're reporting here -> bogus. ------------------------------------------------------------------------ [2009-12-21 20:12:24] hp at oeri dot ch Description: ------------ zend_parse_method_parameters_ex can be called in a method or a plain function. Flags are - however - only respected in the OOP context and ignored in a procedural context. Parameter parsing is therefore greatly limited. Procedural context Zend_API.c:1194 (svn head) retval = zend_parse_va_args(num_args, type_spec, &va, **0** TSRMLS_CC); OOP context Zend_API.c:1213 (svn head) retval = zend_parse_va_args(num_args, p, &va, **flags** TSRMLS_CC); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50546&edit=1

« previous php.bugs (#146014) next »