reference/errorfunc/functions/error-log.xml
769812c12f00c1978bf7dd711dca38dbf05462da
...
...
@@ -12,8 +12,8 @@
12
12
<type>bool</type><methodname>error_log</methodname>
13
13
<methodparam><type>string</type><parameter>message</parameter></methodparam>
14
14
<methodparam choice="opt"><type>int</type><parameter>message_type</parameter><initializer>0</initializer></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>destination</parameter></methodparam>
16
-
<methodparam choice="opt"><type>string</type><parameter>extra_headers</parameter></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>destination</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>additional_headers</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
Sends an error message to the web server's error log or to a file.
...
...
@@ -59,7 +59,7 @@
59
59
<parameter>message</parameter> is sent by email to the address in
60
60
the <parameter>destination</parameter> parameter. This is the only
61
61
message type where the fourth parameter,
62
-
<parameter>extra_headers</parameter> is used.
62
+
<parameter>additional_headers</parameter> is used.
63
63
</entry>
64
64
</row>
65
65
<row>
...
...
@@ -99,7 +99,7 @@
99
99
</listitem>
100
100
</varlistentry>
101
101
<varlistentry>
102
-
<term><parameter>extra_headers</parameter></term>
102
+
<term><parameter>additional_headers</parameter></term>
103
103
<listitem>
104
104
<para>
105
105
The extra headers. It's used when the <parameter>message_type</parameter>
...
...
@@ -117,21 +117,32 @@
117
117
&reftitle.returnvalues;
118
118
<para>
119
119
&return.success;
120
+
If <parameter>message_type</parameter> is zero, this function always returns &true;,
121
+
regardless of whether the error could be logged or not.
120
122
</para>
121
123
</refsect1>
122
124

123
-
<refsect1 role="notes">
124
-
&reftitle.notes;
125
-
<warning>
126
-
<simpara>
127
-
<function>error_log</function> is not binary safe. <parameter>message</parameter> will be truncated by null character.
128
-
</simpara>
129
-
</warning>
130
-
<tip>
131
-
<simpara>
132
-
<parameter>message</parameter> should not contain null character. Note that <parameter>message</parameter> may be sent to file, mail, syslog, etc. Use appropriate conversion/escape function, <function>base64_encode</function>, <function>rawurlencode</function> or <function>addslashes</function> before calling <function>error_log</function>.
133
-
</simpara>
134
-
</tip>
125
+
<refsect1 role="changelog">
126
+
&reftitle.changelog;
127
+
<informaltable>
128
+
<tgroup cols="2">
129
+
<thead>
130
+
<row>
131
+
<entry>&Version;</entry>
132
+
<entry>&Description;</entry>
133
+
</row>
134
+
</thead>
135
+
<tbody>
136
+
<row>
137
+
<entry>8.0.0</entry>
138
+
<entry>
139
+
<parameter>destination</parameter> and
140
+
<parameter>additional_headers</parameter> are now nullable.
141
+
</entry>
142
+
</row>
143
+
</tbody>
144
+
</tgroup>
145
+
</informaltable>
135
146
</refsect1>
136
147

137
148
<refsect1 role="examples">
...
...
@@ -163,8 +174,21 @@ error_log("You messed up!", 3, "/var/tmp/my-errors.log");
163
174
</para>
164
175
</refsect1>
165
176

166
-
</refentry>
177
+
<refsect1 role="notes">
178
+
&reftitle.notes;
179
+
<warning>
180
+
<simpara>
181
+
<function>error_log</function> is not binary safe. <parameter>message</parameter> will be truncated by null character.
182
+
</simpara>
183
+
</warning>
184
+
<tip>
185
+
<simpara>
186
+
<parameter>message</parameter> should not contain null character. Note that <parameter>message</parameter> may be sent to file, mail, syslog, etc. Use appropriate conversion/escape function, <function>base64_encode</function>, <function>rawurlencode</function> or <function>addslashes</function> before calling <function>error_log</function>.
187
+
</simpara>
188
+
</tip>
189
+
</refsect1>
167
190

191
+
</refentry>
168
192
<!-- Keep this comment at the end of the file
169
193
Local variables:
170
194
mode: sgml
171
195