You are here

function _boost_page_have_error in Boost 6

Get PHP error if it exists.

2 calls to _boost_page_have_error()
boost_block in ./boost.module
Implementation of hook_block().
_boost_ob_handler in ./boost.module
PHP output buffering callback for static page caching.

File

./boost.module, line 5042
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function _boost_page_have_error() {
  if (function_exists('error_get_last')) {
    $error_ignore = variable_get('boost_halt_on_errors_list', array(
      E_NOTICE,
      E_USER_NOTICE,
    ));
    if (BOOST_HALT_ON_ERRORS && ($error = error_get_last())) {
      if (in_array($error['type'], $error_ignore)) {
        return FALSE;
      }
      else {

        // Do not cache page on all other errors
        $GLOBALS['_boost_cache_this'] = FALSE;
        return $error;
      }
    }
  }
  return FALSE;
}