Commit 3e58aba8 authored by Angie Byron's avatar Angie Byron
Browse files

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
Loading
Loading
Loading
Loading
+5 −0
Changes for core/modules/system/src/Controller/SystemInfoController.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -61,9 +61,14 @@ public function status() {
   *   A response object to be sent to the client.
   */
  public function php() {
    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);
  }