You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I attempt to write an empty config to a file (say, I removed the last remaining section) using Supervisor\Configuration\Writer\File it will throw a [Supervisor\Exception\WrittingFailed] Cannot write configuration into file /path/to/file.conf exception.
Storing an empty string to a file $this->writeFile($fileContents)) will return 0, this in turen gets evaluates as false, and an exception will be thrown:
if (!$result = $this->writeFile($fileContents)) {
throw new WrittingFailed(sprintf('Cannot write configuration into file %s', $this->file));
}
Even though the write operation was successful.
Non boolean value go evaluated to false, a check for boolean false fixes this issue:
if (false === $result = $this->writeFile($fileContents)) {
throw new WrittingFailed(sprintf('Cannot write configuration into file %s', $this->file));
}
When I attempt to write an empty config to a file (say, I removed the last remaining section) using
Supervisor\Configuration\Writer\File
it will throw a[Supervisor\Exception\WrittingFailed] Cannot write configuration into file /path/to/file.conf
exception.Storing an empty string to a file
$this->writeFile($fileContents))
will return 0, this in turen gets evaluates as false, and an exception will be thrown:Even though the write operation was successful.
Non boolean value go evaluated to false, a check for boolean false fixes this issue:
More details: http://php.net/manual/en/function.file-put-contents.php
The text was updated successfully, but these errors were encountered: