didou Tue Mar 2 10:22:06 2004 EDT
Modified files:
/phpdoc/en/reference/errorfunc constants.xml examples.xml
Log:
fix for #27459
http://cvs.php.net/diff.php/phpdoc/en/reference/errorfunc/constants.xml?r1=1.12&r2=1.13&ty=u
Index: phpdoc/en/reference/errorfunc/constants.xml
diff -u phpdoc/en/reference/errorfunc/constants.xml:1.12
phpdoc/en/reference/errorfunc/constants.xml:1.13
--- phpdoc/en/reference/errorfunc/constants.xml:1.12 Mon Feb 16 11:03:09 2004
+++ phpdoc/en/reference/errorfunc/constants.xml Tue Mar 2 10:22:06 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<section id="errorfunc.constants">
&reftitle.constants;
&extension.constants.core;
@@ -86,7 +86,7 @@
Fatal errors that occur during PHP's initial startup. This is like an
<constant>E_ERROR</constant>, except it is generated by the core of PHP.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-core-warning">
@@ -100,7 +100,7 @@
This is like an <constant>E_WARNING</constant>, except it is generated
by the core of PHP.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-compile-error">
@@ -113,7 +113,7 @@
Fatal compile-time errors. This is like an <constant>E_ERROR</constant>,
except it is generated by the Zend Scripting Engine.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-compile-warning">
@@ -127,7 +127,7 @@
<constant>E_WARNING</constant>, except it is generated by the Zend
Scripting Engine.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-user-error">
@@ -141,7 +141,7 @@
<constant>E_ERROR</constant>, except it is generated in PHP code by
using the PHP function <function>trigger_error</function>.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-user-warning">
@@ -155,7 +155,7 @@
<constant>E_WARNING</constant>, except it is generated in PHP code by
using the PHP function <function>trigger_error</function>.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-user-notice">
@@ -169,7 +169,7 @@
<constant>E_NOTICE</constant>, except it is generated in PHP code by
using the PHP function <function>trigger_error</function>.
</entry>
- <entry>PHP 4 only</entry>
+ <entry>since PHP 4</entry>
</row>
<row id="e-all">
@@ -197,7 +197,7 @@
to your code which will ensure the best interoperability
and forward compatibility of your code.
</entry>
- <entry>PHP 5 only</entry>
+ <entry>since PHP 5</entry>
</row>
</tbody>
http://cvs.php.net/diff.php/phpdoc/en/reference/errorfunc/examples.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/errorfunc/examples.xml
diff -u phpdoc/en/reference/errorfunc/examples.xml:1.5
phpdoc/en/reference/errorfunc/examples.xml:1.6
--- phpdoc/en/reference/errorfunc/examples.xml:1.5 Thu Jan 15 07:42:17 2004
+++ phpdoc/en/reference/errorfunc/examples.xml Tue Mar 2 10:22:06 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<section id="errorfunc.examples">
&reftitle.examples;
<para>
@@ -23,19 +23,21 @@
// define an assoc array of error string
// in reality the only entries we should
- // consider are 2,8,256,512 and 1024
+ // consider are E_WARNING, E_NOTICE, E_USER_ERROR,
+ // E_USER_WARNING and E_USER_NOTICE
$errortype = array (
- 1 => "Error",
- 2 => "Warning",
- 4 => "Parsing Error",
- 8 => "Notice",
- 16 => "Core Error",
- 32 => "Core Warning",
- 64 => "Compile Error",
- 128 => "Compile Warning",
- 256 => "User Error",
- 512 => "User Warning",
- 1024 => "User Notice"
+ E_ERROR => "Error",
+ E_WARNING => "Warning",
+ E_PARSE => "Parsing Error",
+ E_NOTICE => "Notice",
+ E_CORE_ERROR => "Core Error",
+ E_CORE_WARNING => "Core Warning",
+ E_COMPILE_ERROR => "Compile Error",
+ E_COMPILE_WARNING => "Compile Warning",
+ E_USER_ERROR => "User Error",
+ E_USER_WARNING => "User Warning",
+ E_USER_NOTICE => "User Notice",
+ E_STRICT => "Runtime Notice"
);
// set of errors for which a var trace will be saved
$user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
@@ -57,8 +59,9 @@
// save to the error log, and e-mail me if there is a critical user error
error_log($err, 3, "/usr/local/php4/error.log");
- if ($errno == E_USER_ERROR)
+ if ($errno == E_USER_ERROR) {
mail("[EMAIL PROTECTED]", "Critical User Error", $err);
+ }
}
@@ -100,7 +103,7 @@
// define some "vectors"
$a = array(2, 3, "foo");
$b = array(5.5, 4.3, -1.6);
-$c = array (1, -3);
+$c = array(1, -3);
// generate a user error
$t1 = distance($c, $b) . "\n";