Patch exec-to-passthru for Online Doc Editor problem Bug #63697
Patch version 2012-12-25 14:05 UTC
Return to Bug #63697 |
Download this patch
Patch Revisions:
Developer: shein@php.net
Index: php/SaferExec.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- php/SaferExec.php (revision 328895)
+++ php/SaferExec.php (revision )
@@ -24,14 +24,16 @@
if (!($cur_command instanceof ExecStatement))
{
trigger_error('Unexpected object encountered. Command will not execute.', E_USER_ERROR);
- return '';
+ return;
}
}
// Now that we've verified that we're looking at an array of ExecStatements, we can start working with them
$command = implode('; ', $command_array);
- return exec($command, $output, $return_var);
+ ob_start();
+ passthru($command, $return_var);
+ $output = explode(PHP_EOL, ob_get_clean());
}
}
|