To enable to the TransportException code to be accessed in PHP < 8.1, make reflection property accessible (#11974)
parent
8d90eb694a
commit
d4b071bd1e
|
@ -446,6 +446,7 @@ class Application extends BaseApplication
|
||||||
// as http error codes are all beyond the 255 range of permitted exit codes
|
// as http error codes are all beyond the 255 range of permitted exit codes
|
||||||
if ($e instanceof TransportException) {
|
if ($e instanceof TransportException) {
|
||||||
$reflProp = new \ReflectionProperty($e, 'code');
|
$reflProp = new \ReflectionProperty($e, 'code');
|
||||||
|
$reflProp->setAccessible(true);
|
||||||
$reflProp->setValue($e, Installer::ERROR_TRANSPORT_EXCEPTION);
|
$reflProp->setValue($e, Installer::ERROR_TRANSPORT_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue