With memory_limit of '50M', it got automatically turned into '50' in a
numeric context, which ended up passing *zero* kilobytes for ulimit.
This would make nothing able to run on Linux, things would just segfault.
* Changed mail form to have a bigger message entry box (like for editing
a page
* Support <includeonly> in templates loaded through preload= parameter
+* Fix ulimit parameters for wfShellExec when memory_limit is specified in 'm'
+
=== Caveats ===
if ( php_uname( 's' ) == 'Linux' ) {
$time = ini_get( 'max_execution_time' );
$mem = ini_get( 'memory_limit' );
+ if( preg_match( '/^([0-9]+)[Mm]$/', trim( $mem ), $m ) ) {
+ $mem = intval( $m[1] * (1024*1024) );
+ }
if ( $time > 0 && $mem > 0 ) {
$script = "$IP/bin/ulimit.sh";
if ( is_executable( $script ) ) {