YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

error #391

Open webmaster20 opened 4 years ago

webmaster20 commented 4 years ago

hi

error:

[17-Sep-2020 08:37:21 UTC] PHP Warning: Use of undefined constant FILE - assumed 'FILE' (this will throw an Error in a future version of PHP) in /home/sirob/public_html/wp-content/plugins/ar-contactus/ar-contactus.php on line 39 [17-Sep-2020 08:37:21 UTC] PHP Fatal error: Uncaught RuntimeException: The update checker cannot determine if "FILE" is a plugin or a theme. This is a bug. Please contact the PUC developer. in /home/sirob/public_html/wp-content/plugins/ar-contactus/plugin-update-checker/Puc/v4p10/Factory.php:80 Stack trace:

0 /home/sirob/public_html/wp-content/plugins/ar-contactus/ar-contactus.php(40): Puc_v4p10_Factory::buildUpdateChecker('http://example....', 'FILE', 'ar-contactus')

1 /home/sirob/public_html/wp-settings.php(377): include_once('/home/sirob/...')

2 /home/sirob/public_html/wp-config.php(90): require_once('/home/sirob/...')

3 /home/sirob/public_html/wp-load.php(37): require_once('/home/sirob/...')

4 /home/sirob/public_html/wp-blog-header.php(13): require_once('/home/sirob/...')

5 /home/sirob/public_html/index.php(17): require('/home/sirob/...')

6 {main}

thrown in /home/sirob/public_html/wp-content/plugins/ar-contactus/plugin-update-checker/Puc/v4p10/Factory.php on line 80

YahnisElsts commented 4 years ago

Try replacing FILE with __FILE__. The underscores are part of the name of the constant and it won't work without them.