Skip to content

Commit

Permalink
Fix check for PHP memory_limit setting
Browse files Browse the repository at this point in the history
Allow -1 (unlimited) as a valid setting for memory_limit
http://php.net/manual/en/ini.core.php#ini.memory-limit

Fixes #21284
  • Loading branch information
atrol committed Nov 11, 2018
1 parent 739d57c commit ec29630
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/check/check_php_inc.php
Expand Up @@ -173,9 +173,10 @@
check_format_number( ini_get_number( 'post_max_size' ) )
);

$t_memory_limit = ini_get_number( 'memory_limit' );
check_print_test_row(
'memory_limit php.ini directive is at least equal to the post_max_size directive',
ini_get_number( 'memory_limit' ) >= ini_get_number( 'post_max_size' ),
$t_memory_limit >= ini_get_number( 'post_max_size' ) || $t_memory_limit == -1,
array( false => 'The current value of the memory_limit directive is ' . htmlentities( ini_get_number( 'memory_limit' ) ) . ' bytes. This value needs to be at least equal to the post_max_size directive value of ' . htmlentities( ini_get_number( 'post_max_size' ) ) . ' bytes.' )
);

Expand Down

0 comments on commit ec29630

Please sign in to comment.