Opened 16 years ago
Closed 16 years ago
#8140 closed defect (bug) (invalid)
Auto update plugin breaks plugins
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | Upgrade/Install | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description ¶
I was updating my plugins using the auto update system on Wordpress 2.6.3 and after upgrading Akismet to the latest version, the plugins page spit out some errors at the top of the page saying:
Warning: include_once(/home/public/wp-content/plugins/akismet) Fatal error: 0 on wp-settings line 425
...
I did the same for the WP-Super-Cache to make sure it wasn't just a messed up akismet plugin, but I got the same results. Curious I looked at the code and found
if ( != $plugin && 0 == validate_file($plugin) && file_exists(WP_PLUGIN_DIR . '/' . $plugin) )
include_once(WP_PLUGIN_DIR . '/' . $plugin);
However, the $plugin var here is a directory, which PHP doesn't like one bit. I have attached a diff to fix this, and now it works just dandy.
Pull Requests
- Loading…
Change History (9)
#1
@
16 years ago
That fixes the warning, But doesnt fix the root cause of why its not returning the full path to the plugin, something else broke elsewhere to cause that, But i cannot reproduce it under 2.6 or 2.7
This shouldnt be a problem under 2.7 AFAIK, But changing the file_exists() to is_file() seems like a good idea eitherway.
#2
@
16 years ago
It does fix the warning, and also makes the plugin work again. I have found this bug in 2.7 as well, and had to fix line 485.
#5
@
16 years ago
- Keywords has-patch commit added; plugins include_once 2.6.3 removed
+1 to the wps.diff patch, though.
A diff of what I did to fx the auto update plugin feature