Commit 3e58aba8 authored by webchick's avatar webchick

Issue #2465467 by willzyx, Dom., andypost: SystemInfoController::php() should...

Issue #2465467 by willzyx, Dom., andypost: SystemInfoController::php() should check if function phpinfo() exists
parent 14c7df74
......@@ -61,9 +61,14 @@ public function status() {
* A response object to be sent to the client.
*/
public function php() {
ob_start();
phpinfo();
$output = ob_get_clean();
if (function_exists('phpinfo')) {
ob_start();
phpinfo();
$output = ob_get_clean();
}
else {
$output = t('The phpinfo() function has been disabled for security reasons. For more information, visit <a href="@phpinfo">Enabling and disabling phpinfo()</a> handbook page.', array('@phpinfo' => 'https://drupal.org/node/243993'));
}
return new Response($output);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment