Replace is_resource with different than false
This will avoid an issue when proc_open will return an object instead of a resource in future PHP versions. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
2a96c4b98e
commit
5a79ac768d
@ -17,7 +17,6 @@ use function feof;
|
||||
use function fgets;
|
||||
use function fwrite;
|
||||
use function htmlspecialchars;
|
||||
use function is_resource;
|
||||
use function proc_close;
|
||||
use function proc_open;
|
||||
use function sprintf;
|
||||
@ -140,7 +139,7 @@ abstract class ExternalTransformationsPlugin extends TransformationsPlugin
|
||||
],
|
||||
];
|
||||
$process = proc_open($program . ' ' . $options[1], $descriptorspec, $pipes);
|
||||
if (is_resource($process)) {
|
||||
if ($process !== false) {
|
||||
fwrite($pipes[0], $buffer);
|
||||
fclose($pipes[0]);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user