Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to access array offset on value of type null #528

Closed
ernibert opened this issue Feb 9, 2020 · 7 comments · May be fixed by #535
Closed

Trying to access array offset on value of type null #528

ernibert opened this issue Feb 9, 2020 · 7 comments · May be fixed by #535

Comments

@ernibert
Copy link

ernibert commented Feb 9, 2020

Hi guys,
first of: Thanks for creating and maintaining Pico. It's so great! Thanks!

Just one thing: My error.log gets filled with a good amount of following lines:

[Sun Feb 09 13:11:30.006957 2020] [php7:notice] [pid 1200] [client a.b.c.d:59702] PHP Notice: Trying to access array offset on value of type null in /path/to/pico/vendor/erusev/parsedown-extra/ParsedownExtra.php on line 338, referer: https://what.ever.tld

Is there something for me to fix (or at least as a workaround, to hide) it?

I've pico-2.1.1 installed. If you need additional info, let me know.

--
Thomas

@PhrozenByte
Copy link
Collaborator

Unfortunately we currently got some issues with Parsedown in general, not sure about a solution yet... 😒

In the meantime you could exclude E_NOTICE errors from being logged. Add the following to your PHP config. I highly recommend doing this for Pico only!

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

You can either add this to your virtual-host-specific php.ini or, alternatively, if you're running Apache with mod_php, you can also use .htaccess like the following:

php_value error_reporting "E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE"

E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE reads as: report (and possibly also log) all errors except E_DEPRECATED (i.e. deprecation warnings), E_STRICT (i.e. strict coding warnings) and E_NOTICE (i.e. coding notices; this is what you're seeing). Excluding E_DEPRECATED and E_STRICT is recommended in production in general.

@ernibert
Copy link
Author

ernibert commented Feb 9, 2020

Thanks for the quick reply. I used the virtual-host approach in .htaccess.

Works perfect so far :-)

@stale
Copy link

stale bot commented Feb 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! 👍

@PhrozenByte
Copy link
Collaborator

PhrozenByte commented Mar 29, 2020

Labelling this as type: Bug and status: Resolved - type: Question was just wrong (my bad).

I've just created Pico v3.0.0-alpha.1 resolving this issue by upgrading (resp. "downgrading" for Parsedown, even though that's not really true either, it's a weird situation...) Pico's dependencies. See #534 (comment) for more info.

If you're going to try it out, please let me know about your experiences.

@KoljaL
Copy link

KoljaL commented Apr 9, 2020

Hey PhrozenByte

I installed the 3.0.0-alpha1 on my Webspace and added the learn2 Theme, which includes the PageList-Plugin.
It works fine, but after installing the PicoEditor i get this message:
Notice: Trying to access array offset on value of type null in /www/htdocs/domain.de/plugins/PicoPagesList/PicoPagesList.php on line 67
But the Editor is still working.

Thanks for your great small CMS :-)

@PhrozenByte
Copy link
Collaborator

This is an issue with the plugin PicoPagesList and different from the issue mentioned above (what indeed is an issue with Pico's core resp. one of Pico's dependencies). Please let the plugin developer know about this (rather small, but nevertheless) issue. You should experience this issue no matter the Pico version (i.e. with both Pico 2.1 and Pico 3.0.0-alpha.1). Anyway, even though it's a different issue you can still follow the same instructions as above to hide it: #528 (comment)

@KoljaL
Copy link

KoljaL commented Apr 9, 2020

I will do so.
Thanks for your quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants