fwiep
Forum Replies Created
-
Hello again,
Having debugged the issue on the shared hosting, I have discovered the following. In the plugin’s
class-create-archive.php
, there is a function calledposix_getpwuid()
. It translates a file’sUID
andGID
to their corresponding names.On this shared hosting, the first part (call to
posix_getpwuid()
) succeeds, but the second part (call toposix_getgrgid()
) fails and returnsFALSE
. Therefore the following statement$group = $info['name'];
fails with the original error: “Trying to access array offset on value of type bool”. Now that finally makes sense ?? .I propose to safeguard against this possibility by rewriting the calls like this:
if (function_exists('posix_getpwuid') && ($info = posix_getpwuid($uid))) { $owner = $info['name']; } if (function_exists('posix_getgrgid') && ($info = posix_getgrgid($gid))) { $group = $info['name']; }
Would you please consider adding this safeguard to the plugin’s official source code?
Thanks,
FWiePHello again.
I have followed in your footsteps and installed a clean WordPress with your plugin on a local test machine using PHP 8.2.
You are correct: there are no warnings during execution or in the logs. The warnings I get in the original post, I will have to debug myself on that specific shared hosting server… ??
Thanks for your effort and support,
FWiePHi, thanks for your reply.
I have disabled all other plugins and ran the Job ‘dataabase only’. It still generates 6 warnings.
This is the system info:
screenshot of info
I see the same PHP, WordPress and plugin versions.This is the logfile of this job:
logfileIs there anything else I can try?
FWieP