mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Improve example regarding valid HTML
This integrated user note 125348. Also, there is no need to `break` after `exit`ing. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350547 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
70528fcff5
commit
f29b00cccf
1 changed files with 3 additions and 1 deletions
|
@ -230,6 +230,9 @@ function myErrorHandler($errno, $errstr, $errfile, $errline)
|
|||
return false;
|
||||
}
|
||||
|
||||
// $errstr may need to be escaped:
|
||||
$errstr = htmlspecialchars($errstr);
|
||||
|
||||
switch ($errno) {
|
||||
case E_USER_ERROR:
|
||||
echo "<b>My ERROR</b> [$errno] $errstr<br />\n";
|
||||
|
@ -237,7 +240,6 @@ function myErrorHandler($errno, $errstr, $errfile, $errline)
|
|||
echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
|
||||
echo "Aborting...<br />\n";
|
||||
exit(1);
|
||||
break;
|
||||
|
||||
case E_USER_WARNING:
|
||||
echo "<b>My WARNING</b> [$errno] $errstr<br />\n";
|
||||
|
|
Loading…
Reference in a new issue