Skip to content

Commit 21ce7d7

Browse files
mmalferovvrana
authored andcommitted
set-error-handler.xml Remove the misleading statement
For the method of the class as an error handler, the `set_error_handler` function may return a `callable`: a) a string b) a Closure c) an indexed array (with the name of the class or an instance of the class in the first element, and the name of the method in the second one) However, it is not limited to just "an indexed array with the class and method name". I suggest removing the mention of the array as a return value, otherwise we will have to list every possible type of callable value :)
1 parent 983b98c commit 21ce7d7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

reference/errorfunc/functions/set-error-handler.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,8 @@
159159
<refsect1 role="returnvalues">
160160
&reftitle.returnvalues;
161161
<para>
162-
Returns the previously defined error handler (if any). If
163-
the built-in error handler is used &null; is returned.
164-
If the previous error handler
165-
was a class method, this function will return an indexed array with the class
166-
and the method name.
162+
Returns the previously defined error handler (if any) as a <type>callable</type>.
163+
If the built-in error handler is used &null; is returned.
167164
</para>
168165
</refsect1>
169166

0 commit comments

Comments
 (0)