mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
PHP Bug workaround https://github.com/php/php-src/issues/8218
This commit is contained in:
parent
56f5a8574c
commit
de9754c153
1 changed files with 16 additions and 0 deletions
|
@ -8037,6 +8037,11 @@ function getIncludeFileContentV1($filePath, $varsArray=array()){
|
|||
foreach ($varsArray as $key => $value) {
|
||||
$$key = $value;
|
||||
}
|
||||
if(doesPHPVersioHasOBBug()){
|
||||
include $filePath;
|
||||
return '';
|
||||
}
|
||||
|
||||
_ob_start();
|
||||
if(!ob_get_level()){
|
||||
_ob_start(true);
|
||||
|
@ -8084,3 +8089,14 @@ function getIncludeFileContentV2($filePath, $varsArray=array()){
|
|||
echo $__out;
|
||||
return $return;
|
||||
}
|
||||
|
||||
//https://github.com/php/php-src/issues/8218
|
||||
function doesPHPVersioHasOBBug(){
|
||||
if (version_compare(phpversion(), "8.1.4", "==")) {
|
||||
return true;
|
||||
} else if (version_compare(phpversion(), "8.0.17", "==")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue