Magic caller.
Description
Ensures unhandled errors still trigger proper messages without causing a fatal error.
See also
Parameters
- $method_name
-
(string) (Required) Method name.
- $arguments
-
(array) (Required) Method arguments.
Return
(awsmug\Torro_Forms\Error) Pass-through error instance.
Source
File: src/error.php
public function __call( $method_name, $arguments ) { if ( ! $this->error_handled ) { /* translators: %s: method name */ $this->handle_error( sprintf( __( 'After the error occurred, it was tried to call method %s on the unhandled error object.', 'torro-forms' ), '<code>' . $method_name . '()</code>' ) ); $this->error_handled = true; } return $this; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |