1
0
Fork 0

Simplify php bin proxies further

pull/10231/head
Jordi Boggiano 2021-10-27 11:24:50 +02:00
parent e1dbd65aff
commit df6c2ce1db
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 14 deletions

View File

@ -277,25 +277,13 @@ class BinaryInstaller
* @generated * @generated
*/ */
\$binPath = realpath(__DIR__ . "/" . $binPathExported); if (PHP_VERSION_ID < 80000) {
if (PHP_VERSION_ID >= 80000) {
include \$binPath;
exit(0);
}
\$contents = file_get_contents(\$binPath);
\$contents = preg_replace('{^#!/.+\\r?\\n<\\?(php)?}', '', \$contents, 1, \$replaced);
if (\$replaced) {
ob_start(function (\$buffer, \$phase) { ob_start(function (\$buffer, \$phase) {
return (PHP_OUTPUT_HANDLER_START & \$phase) && '#!' === substr(\$buffer, 0, 2) ? '' : \$buffer; return (PHP_OUTPUT_HANDLER_START & \$phase) && '#!' === substr(\$buffer, 0, 2) ? '' : \$buffer;
}, 1); }, 1);
include \$binPath;
exit(0);
} }
include \$binPath;
include __DIR__ . "/" . $binPathExported;
PROXY; PROXY;
} }
} }