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