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 30
30
#include "ext/session/php_session.h"
31
31
#include "zend_exceptions.h"
32
32
#include "zend_attributes.h"
33
+ #include "zend_ini.h"
33
34
#include "zend_operators.h"
34
35
#include "ext/standard/php_dns.h"
35
36
#include "ext/standard/php_uuencode.h"
@@ -1974,14 +1975,19 @@ PHP_FUNCTION(highlight_string)
1974
1975
/* {{{ Get interpreted size from the ini shorthand syntax */
1975
1976
PHP_FUNCTION (ini_parse_quantity )
1976
1977
{
1977
- char * shorthand ;
1978
- size_t shorthand_len ;
1978
+ zend_string * shorthand ;
1979
+ zend_string * errstr ;
1979
1980
1980
1981
ZEND_PARSE_PARAMETERS_START (1 , 1 )
1981
- Z_PARAM_STRING (shorthand , shorthand_len )
1982
+ Z_PARAM_STR (shorthand )
1982
1983
ZEND_PARSE_PARAMETERS_END ();
1983
1984
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
+ }
1985
1991
}
1986
1992
/* }}} */
1987
1993
You can’t perform that action at this time.
0 commit comments