Skip to content

Commit

Permalink
Only use error_log if the server doesn't have it disabled. Fixes simp…
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccue committed Sep 29, 2009
1 parent dc94aa4 commit fbe3c25
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion simplepie.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9234,7 +9234,17 @@ class SimplePie_Misc
$note = 'Unknown Error';
break;
}
error_log("$note: $message in $file on line $line", 0);

$log_error = true;
if (!function_exists('error_log'))
$log_error = false;

$log_file = @ini_get('error_log');
if (!empty($log_file) && ('syslog' != $log_file) && !@is_writable($log_file))
$log_error = false;

if ( $log_error )
@error_log("$note: $message in $file on line $line", 0);
}
return $message;
}
Expand Down

0 comments on commit fbe3c25

Please sign in to comment.