-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
PHP Warning: array_merge() #242
Comments
This won't be fixed, we are introducing new functions for the same functionality. This function will be deprecated. |
Do you know if this breaks something or it is mostly harmless? I mean can we leave it be like this? |
It is mostly harmless. It will be deprecated with a new function and a warning will trigger in logs if someone use this function. |
Well it is not harmless at all, in two plugins the files/directories can't be removed. So both plugins are useless and since their dev is MIA, there is no way to fix that. |
replace existing function rglob($pattern, $flags = 0, $path = '')
{
if (!$path && ($dir = dirname($pattern)) !== '.') {
if ($dir === '\\' || $dir === '/') {
$dir = '';
}
return rglob(basename($pattern), $flags, $dir . '/');
}
$paths = glob($path . '*', GLOB_ONLYDIR | GLOB_NOSORT);
$files = glob($path . $pattern, $flags);
foreach ($paths as $p) {
$files = array_merge($files, rglob($pattern, $flags, $p . '/'));
}
return $files;
} |
Will do and update here, thanks |
Thanks @navjottomer god bless you man! I have no idea what we would do without your 3.9 work. |
Describe the bug
From debug log
[22-May-2020 02:18:08 America/Los_Angeles] PHP Warning: array_merge(): Argument # 2 is not an array in /home/public_html/oc-includes/osclass/utils.php on line 1678
To Reproduce
I think some plugin is doing a cleanup of files, removing files from directories or something like that. Not sure if this could come from a plugin?
Osclass 3.9 and PHP 7.2.x
The text was updated successfully, but these errors were encountered: