Skip to content

Commit 2163b1f

Browse files
author
joseph lenton
committed
added documentation for html_only
* Added a doc comment for html_only option. * Now turn the given value for html_only to a boolean * Formatted html_only to match other options * added missing private field declarations for htmlOnly and displayLineNumbers.
1 parent 9fc7830 commit 2163b1f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/php_error.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,9 @@ public static function identifyTypeHTML( $arg, $recurseLevels=1 ) {
11031103
private $backgroundText;
11041104
private $numLines;
11051105

1106+
private $displayLineNumber;
1107+
private $htmlOnly;
1108+
11061109
private $bufferOutput;
11071110
private $isInEndBuffer;
11081111

@@ -1161,6 +1164,11 @@ public static function identifyTypeHTML( $arg, $recurseLevels=1 ) {
11611164
* - background_text The text that appeares in the background. By default this is blank.
11621165
* Why? You can replace this with the name of your framework, for extra customization spice.
11631166
*
1167+
* - html_only By default, PHP Error only runs on ajax and HTML pages.
1168+
* If this is false, then it will also run when on non-HTML
1169+
* pages too, such as replying with images of JavaScript
1170+
* from your PHP. Defaults to true.
1171+
*
11641172
* @param options Optional, an array of values to customize this handler.
11651173
* @throws Exception This is raised if given an options that does *not* exist (so you know that option is meaningless).
11661174
*/
@@ -1220,7 +1228,7 @@ public function __construct( $options=null ) {
12201228
$this->numLines = ErrorHandler::optionsPop( $options, 'snippet_num_lines' , ErrorHandler::NUM_FILE_LINES );
12211229
$this->displayLineNumber = ErrorHandler::optionsPop( $options, 'display_line_numbers' , false );
12221230

1223-
$this->htmlOnly = ErrorHandler::optionsPop( $options, 'html_only', true );
1231+
$this->htmlOnly = !! ErrorHandler::optionsPop( $options, 'html_only', true );
12241232

12251233
$this->classNotFoundException = null;
12261234

0 commit comments

Comments
 (0)