references:joomla.framework:utilities:jerror-iserrorisError
Determines whether the return value of a pat application method (i.e. patTemplate method) is a patError object. If it is, the funtion returns true. Otherwise, it returns false. Syntaxboolean isError ( &$object )
ExamplesExample JError::setErrorHandling( E_ALL, 'store' ); $template = JTemplate::getInstance(); $template->readTemplatesFromInput( 'page.html' ); $result = $template->fetch( 'wrongname' ); if (JError::isError( $result ) ) { echo "Yes, it is an error"; } else { echo "No, it is not an error"; } might produce: Result Yes, it is an error |


