Skip to content

Commit

Permalink
Fix php error in error_api
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Oct 27, 2014
1 parent 1c1c29e commit f8c57d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/error_api.php
Expand Up @@ -171,7 +171,8 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, array $p_context )
$t_old_contents = ob_get_contents();
if( !error_handled() ) {
# Retrieve the previously output header
if( false !== preg_match_all( '|^(.*)(</head>.*$)|is', $t_old_contents, $t_result ) ) {
if( false !== preg_match_all( '|^(.*)(</head>.*$)|is', $t_old_contents, $t_result ) &&
isset( $t_result[1] ) && isset( $t_result[1][0] ) ) {
$t_old_headers = $t_result[1][0];
unset( $t_old_contents );
}
Expand Down

0 comments on commit f8c57d4

Please sign in to comment.