File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,10 @@ if($count > 1) {
130
130
131
131
$ PIDFILE = getenv ('PIDFILE ' );
132
132
if ($ PIDFILE ) {
133
- file_put_contents ($ PIDFILE , getmypid ()) or (
134
- $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Could not write PID information to {pidfile} ' , array ('pidfile ' => $ PIDFILE )) and
135
- die (2 )
136
- );
133
+ if ( file_put_contents ($ PIDFILE , getmypid ()) === false ){
134
+ $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Could not write PID information to {pidfile} ' , array ('pidfile ' => $ PIDFILE ));
135
+ die (2 );
136
+ }
137
137
}
138
138
139
139
$ registered = TRUE ;
@@ -175,10 +175,10 @@ else {
175
175
176
176
$ PIDFILE = getenv ('PIDFILE ' );
177
177
if ($ PIDFILE ) {
178
- file_put_contents ($ PIDFILE , getmypid ()) or (
179
- $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Could not write PID information to {pidfile} ' , array ('pidfile ' => $ PIDFILE )) and
180
- die (2 )
181
- );
178
+ if ( file_put_contents ($ PIDFILE , getmypid ()) === false ) {
179
+ $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Could not write PID information to {pidfile} ' , array ('pidfile ' => $ PIDFILE ));
180
+ die (2 );
181
+ }
182
182
}
183
183
184
184
$ logger ->log (Psr \Log \LogLevel::NOTICE , 'Starting worker {worker} ' , array ('worker ' => $ worker ));
You can’t perform that action at this time.
0 commit comments