@@ -338,6 +338,10 @@ int zend_startup_builtin_functions(void) /* {{{ */
338338 Get the version of the Zend Engine */
339339ZEND_FUNCTION (zend_version )
340340{
341+ if (zend_parse_parameters_none () == FAILURE ) {
342+ return ;
343+ }
344+
341345 RETURN_STRINGL (ZEND_VERSION , sizeof (ZEND_VERSION )- 1 );
342346}
343347/* }}} */
@@ -347,6 +351,10 @@ ZEND_FUNCTION(zend_version)
347351 Returns number of freed bytes */
348352ZEND_FUNCTION (gc_mem_caches )
349353{
354+ if (zend_parse_parameters_none () == FAILURE ) {
355+ return ;
356+ }
357+
350358 RETURN_LONG (zend_mm_gc (zend_mm_get_heap ()));
351359}
352360/* }}} */
@@ -356,6 +364,10 @@ ZEND_FUNCTION(gc_mem_caches)
356364 Returns number of freed zvals */
357365ZEND_FUNCTION (gc_collect_cycles )
358366{
367+ if (zend_parse_parameters_none () == FAILURE ) {
368+ return ;
369+ }
370+
359371 RETURN_LONG (gc_collect_cycles ());
360372}
361373/* }}} */
@@ -364,6 +376,10 @@ ZEND_FUNCTION(gc_collect_cycles)
364376 Returns status of the circular reference collector */
365377ZEND_FUNCTION (gc_enabled )
366378{
379+ if (zend_parse_parameters_none () == FAILURE ) {
380+ return ;
381+ }
382+
367383 RETURN_BOOL (gc_enabled ());
368384}
369385/* }}} */
@@ -372,7 +388,13 @@ ZEND_FUNCTION(gc_enabled)
372388 Activates the circular reference collector */
373389ZEND_FUNCTION (gc_enable )
374390{
375- zend_string * key = zend_string_init ("zend.enable_gc" , sizeof ("zend.enable_gc" )- 1 , 0 );
391+ zend_string * key ;
392+
393+ if (zend_parse_parameters_none () == FAILURE ) {
394+ return ;
395+ }
396+
397+ key = zend_string_init ("zend.enable_gc" , sizeof ("zend.enable_gc" )- 1 , 0 );
376398 zend_alter_ini_entry_chars (key , "1" , sizeof ("1" )- 1 , ZEND_INI_USER , ZEND_INI_STAGE_RUNTIME );
377399 zend_string_release_ex (key , 0 );
378400}
@@ -382,7 +404,13 @@ ZEND_FUNCTION(gc_enable)
382404 Deactivates the circular reference collector */
383405ZEND_FUNCTION (gc_disable )
384406{
385- zend_string * key = zend_string_init ("zend.enable_gc" , sizeof ("zend.enable_gc" )- 1 , 0 );
407+ zend_string * key ;
408+
409+ if (zend_parse_parameters_none () == FAILURE ) {
410+ return ;
411+ }
412+
413+ key = zend_string_init ("zend.enable_gc" , sizeof ("zend.enable_gc" )- 1 , 0 );
386414 zend_alter_ini_entry_chars (key , "0" , sizeof ("0" )- 1 , ZEND_INI_USER , ZEND_INI_STAGE_RUNTIME );
387415 zend_string_release_ex (key , 0 );
388416}
@@ -394,6 +422,10 @@ ZEND_FUNCTION(gc_status)
394422{
395423 zend_gc_status status ;
396424
425+ if (zend_parse_parameters_none () == FAILURE ) {
426+ return ;
427+ }
428+
397429 zend_gc_get_status (& status );
398430
399431 array_init_size (return_value , 3 );
@@ -411,6 +443,10 @@ ZEND_FUNCTION(func_num_args)
411443{
412444 zend_execute_data * ex = EX (prev_execute_data );
413445
446+ if (zend_parse_parameters_none () == FAILURE ) {
447+ return ;
448+ }
449+
414450 if (ZEND_CALL_INFO (ex ) & ZEND_CALL_CODE ) {
415451 zend_error (E_WARNING , "func_num_args(): Called from the global scope - no function context" );
416452 RETURN_LONG (-1 );
0 commit comments