Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
fix datetime warning in logger
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed Aug 3, 2015
1 parent cc0b99e commit caac37f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/helper/server.inc
Expand Up @@ -4,6 +4,9 @@ ini_set("log_errors", true);
ini_set("error_log", __DIR__."/server.log");

function logger() {
if (!ini_get("date.timezone")) {
date_default_timezone_set(@date_default_timezone_get());
}
error_log(sprintf("%s(%s): %s",
basename(getenv("SCRIPT_FILENAME"), ".php"),
basename(current(get_included_files()), ".inc"),
Expand Down Expand Up @@ -46,7 +49,7 @@ function serve($cb) {
}
logger("serve: EOF on client %d", (int) $client);
} catch (Exception $ex) {
logger("serve: Exception on client %d", (int) $client);
logger("serve: Exception on client %d: %s", (int) $client, $ex->getMessage());
/* ignore disconnect */
if ($ex->getMessage() !== "Empty message received from stream") {
fprintf(STDERR, "%s\n", $ex);
Expand Down

0 comments on commit caac37f

Please sign in to comment.