File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 3030#include "ext/session/php_session.h"
3131#include "zend_exceptions.h"
3232#include "zend_attributes.h"
33+ #include "zend_ini.h"
3334#include "zend_operators.h"
3435#include "ext/standard/php_dns.h"
3536#include "ext/standard/php_uuencode.h"
@@ -1974,14 +1975,19 @@ PHP_FUNCTION(highlight_string)
19741975/* {{{ Get interpreted size from the ini shorthand syntax */
19751976PHP_FUNCTION (ini_parse_quantity )
19761977{
1977- char * shorthand ;
1978- size_t shorthand_len ;
1978+ zend_string * shorthand ;
1979+ zend_string * errstr ;
19791980
19801981 ZEND_PARSE_PARAMETERS_START (1 , 1 )
1981- Z_PARAM_STRING (shorthand , shorthand_len )
1982+ Z_PARAM_STR (shorthand )
19821983 ZEND_PARSE_PARAMETERS_END ();
19831984
1984- RETVAL_LONG (zend_atol (shorthand , shorthand_len ));
1985+ RETVAL_LONG (zend_ini_parse_quantity (shorthand , & errstr ));
1986+
1987+ if (errstr ) {
1988+ zend_error (E_WARNING , "%s" , ZSTR_VAL (errstr ));
1989+ zend_string_release (errstr );
1990+ }
19851991}
19861992/* }}} */
19871993
You can’t perform that action at this time.
0 commit comments