@@ -338,6 +338,10 @@ int zend_startup_builtin_functions(void) /* {{{ */
338
338
Get the version of the Zend Engine */
339
339
ZEND_FUNCTION (zend_version )
340
340
{
341
+ if (zend_parse_parameters_none () == FAILURE ) {
342
+ return ;
343
+ }
344
+
341
345
RETURN_STRINGL (ZEND_VERSION , sizeof (ZEND_VERSION )- 1 );
342
346
}
343
347
/* }}} */
@@ -347,6 +351,10 @@ ZEND_FUNCTION(zend_version)
347
351
Returns number of freed bytes */
348
352
ZEND_FUNCTION (gc_mem_caches )
349
353
{
354
+ if (zend_parse_parameters_none () == FAILURE ) {
355
+ return ;
356
+ }
357
+
350
358
RETURN_LONG (zend_mm_gc (zend_mm_get_heap ()));
351
359
}
352
360
/* }}} */
@@ -356,6 +364,10 @@ ZEND_FUNCTION(gc_mem_caches)
356
364
Returns number of freed zvals */
357
365
ZEND_FUNCTION (gc_collect_cycles )
358
366
{
367
+ if (zend_parse_parameters_none () == FAILURE ) {
368
+ return ;
369
+ }
370
+
359
371
RETURN_LONG (gc_collect_cycles ());
360
372
}
361
373
/* }}} */
@@ -364,6 +376,10 @@ ZEND_FUNCTION(gc_collect_cycles)
364
376
Returns status of the circular reference collector */
365
377
ZEND_FUNCTION (gc_enabled )
366
378
{
379
+ if (zend_parse_parameters_none () == FAILURE ) {
380
+ return ;
381
+ }
382
+
367
383
RETURN_BOOL (gc_enabled ());
368
384
}
369
385
/* }}} */
@@ -372,7 +388,13 @@ ZEND_FUNCTION(gc_enabled)
372
388
Activates the circular reference collector */
373
389
ZEND_FUNCTION (gc_enable )
374
390
{
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 );
376
398
zend_alter_ini_entry_chars (key , "1" , sizeof ("1" )- 1 , ZEND_INI_USER , ZEND_INI_STAGE_RUNTIME );
377
399
zend_string_release_ex (key , 0 );
378
400
}
@@ -382,7 +404,13 @@ ZEND_FUNCTION(gc_enable)
382
404
Deactivates the circular reference collector */
383
405
ZEND_FUNCTION (gc_disable )
384
406
{
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 );
386
414
zend_alter_ini_entry_chars (key , "0" , sizeof ("0" )- 1 , ZEND_INI_USER , ZEND_INI_STAGE_RUNTIME );
387
415
zend_string_release_ex (key , 0 );
388
416
}
@@ -394,6 +422,10 @@ ZEND_FUNCTION(gc_status)
394
422
{
395
423
zend_gc_status status ;
396
424
425
+ if (zend_parse_parameters_none () == FAILURE ) {
426
+ return ;
427
+ }
428
+
397
429
zend_gc_get_status (& status );
398
430
399
431
array_init_size (return_value , 3 );
@@ -411,6 +443,10 @@ ZEND_FUNCTION(func_num_args)
411
443
{
412
444
zend_execute_data * ex = EX (prev_execute_data );
413
445
446
+ if (zend_parse_parameters_none () == FAILURE ) {
447
+ return ;
448
+ }
449
+
414
450
if (ZEND_CALL_INFO (ex ) & ZEND_CALL_CODE ) {
415
451
zend_error (E_WARNING , "func_num_args(): Called from the global scope - no function context" );
416
452
RETURN_LONG (-1 );
0 commit comments