diff --git a/code/web/private_php/ams/autoload/sync.php b/code/web/private_php/ams/autoload/sync.php index 47d6cb61b..2aaf9b069 100644 --- a/code/web/private_php/ams/autoload/sync.php +++ b/code/web/private_php/ams/autoload/sync.php @@ -27,7 +27,11 @@ class Sync{ if(!file_exists($pidfile)) { $pid = getmypid(); $file = fopen($pidfile, 'w+'); - + if (!$file) + echo $pidfile.' is not writeable.'; + error_log($pidfile.' is not writeable.'); + throw new SystemExit(); + } fwrite($file, $pid); fclose($file);