Permalink
Browse files

added _bl_hide_phpinfo constat for enable/disable phpinfo()

PBL uses ob_start() and ob_end_clean() to get the contents of phpinfo(). Some PHP installations may have "problems" with the php buffer and "echoes" the phpinfo() result. _bl_hide_phpinfo can hide the phpinfo() panel.
  • Loading branch information...
1 parent e84ded5 commit 1a9a3545e70ded1b8f5fd0cd7d761ca93547080c @jordifreek committed Dec 7, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 phpbuglost.php
View
@@ -214,13 +214,15 @@
define('_bl_file_viewer', true);
+define('_bl_hide_phpinfo', false);
+
/**
* Use external css file.
* Multiple whit coma: estyle1.css, estyle2.css, style3.css...
* Keep empty for use internal css
* @type string
*/
-define('_bl_css_file', '/PHP-Bug-Lost/assets/presentation.css');
+define('_bl_css_file', '');
/**
* Use external js file. Multiple with coma.
@@ -2574,6 +2576,10 @@ function bl_add_bookmark($type, $title, $url, $quote = '"')
*/
function bl_phpinfo()
{
+ if (_bl_hide_phpinfo) {
+ return '<div class="bl_nothing"><p>phpingo() is disabled. <br />Enable with _bl_hide_phpinfo constant</p></div>';
+ }
+
ob_start();
phpinfo();
$phpinfo = ob_get_contents();

0 comments on commit 1a9a354

Please sign in to comment.