Since PHP 7.4.1 there is pear error with the newest version even though they said its fixed.
Example:
if you try to install any package using the "pecl" a warning error returns with the message:
Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 187
PHP Notice: Trying to access array offset on value of type bool in /usr/share/php/PEAR/REST.php on line 187
The repositories have already been updated, but the problem persists
3
Answers
I met the same issue.
Notice: Trying to access array offset on value of type bool in REST.php on line 181
You may notice that when the cached file not exists,
getCacheId
will returnfalse
. In line 181, the codeif (time() - $cacheid['age'] < $cachettl) {
is trying to access array offset onfalse
.I add a condition to this line to fix it:
I met with the same problem while trying to install xdebug using PECL. Something about that code block that you quoted is causing problems. I think that’s a problem somehow related to MacOS Catalina, saw three people with that error and all were using newest MacOS.
As a workaround I commented the ‘if’ block that you quoted. That seems to get the job done, as I could install xdebug normally after doing that.
I had the same issue and creating the temporary pear cache directory solved it.