How to debug a snippet giving an error?
-
I’ve got quite a handful of snippets going and one of them seems to be throwing an error:
2020/11/22 18:21:09 [error] 65613#65613: *16364 FastCGI sent in stderr: “PHP message: PHP Notice: Undefined variable: output in /www/xxx/public/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()’d code on line 8” while reading response header from upstream, client: xxx, server: xxx, request: “GET /product/compact-mirror-with-dual-magnification/ HTTP/1.0”, upstream: “fastcgi://unix:/var/run/php7.4-fpm-xxx.sock:”, host: “xxx”
Obviously I need to fix something in a snippet, but I’m not sure which one. I edited the ones with the “output” variable so that it should no longer be undefined but It’s still throwing that error. Is there a way to see which snippet is causing this error? One disadvantage to this plugin is that if there is an error it does not point to a specific line in a file as they are all stored on the database.
- The topic ‘How to debug a snippet giving an error?’ is closed to new replies.