bobbingwide / oik-shortcodes

Shortcode, block and API server
https://www.oik-plugins.com/oik-plugins/oik-shortcode-server/
GNU General Public License v2.0
1 stars 0 forks source link

Explain messages produced when parsing oik v3.2.0-RC1 in oik-plugins.co.uk #54

Open bobbingwide opened 6 years ago

bobbingwide commented 6 years ago

When rebuilding the API reference for oik in oik-plugins.co.uk there were quite a few messages produced. Tiny extract from debug.log.

[23-Oct-2017 13:21:06 UTC] PHP Warning: filemtime(): stat failed for /home/oikcouk/public_html/wp-content/plugins/oik//home/oikcouk/public_html/wp-content/plugins/oik/shortcodes/oik-navi.php in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parsed-source.php on line 315 [23-Oct-2017 13:21:06 UTC] PHP Warning: file(/home/oikcouk/public_html/wp-content/plugins/oik//home/oikcouk/public_html/wp-content/plugins/oik/shortcodes/oik-navi.php): failed to open stream: No such file or directory in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/shortcodes/oik-api-importer.php on line 1148 [23-Oct-2017 13:21:06 UTC] PHP Warning: filemtime(): stat failed for /home/oikcouk/public_html/wp-content/plugins/oik//home/oikcouk/public_html/wp-content/plugins/oik/shortcodes/oik-navi.php in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parsed-source.php on line 269 [23-Oct-2017 13:21:06 UTC] PHP Notice: Undefined property: ReflectionFunction::$methodname in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/shortcodes/oik-api-importer.php on line 1214 [23-Oct-2017 13:21:06 UTC] PHP Warning: filemtime(): stat failed for /home/oikcouk/public_html/wp-content/plugins/oik//home/oikcouk/public_html/wp-content/plugins/oik/shortcodes/oik-navi.php in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parsed-source.php on line 315 [23-Oct-2017 13:21:06 UTC] PHP Warning: file(/home/oikcouk/public_html/wp-content/plugins/oik//home/oikcouk/public_html/wp-content/plugins/oik/shortcodes/oik-navi.php): failed to open stream: No such file or directory in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/shortcodes/oik-api-importer.php on line 1148 [23-Oct-2017 13:21:06 UTC] PHP Warning: filemtime(): stat failed for /home/oikcouk/public_html/wp-content/plugins/oik//home/oikcouk/public_html/wp-content/plugins/oik/shortcodes/oik-navi.php in /home/oikcouk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parsed-source.php on line 269

bobbingwide commented 6 years ago

Note: These messages appear on the front end as well, for any function that needs / needed reparsing.

bobbingwide commented 6 years ago

The problem occurs when the oik-lib plugin is not activated. Logic in oikai_build_apiref calls oikai_pseudo_reflect which checks if either opcache is being used or shared library files are being loaded. When oik-lib is not activated then the oikai_using_libs() function returns false. It looks like oikai_reflect() is being used and this returns a $refFunc which is not fit for purpose.

Workaround

Activate oik-lib