Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#8140 closed defect (bug) (invalid)

Auto update plugin breaks plugins

Reported by: ranok Owned by:
Priority: normal Milestone:
Component: Upgrade/Install Version: 2.7
Severity: normal Keywords: reporter-feedback
Cc: Focuses:

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.

Attachments (2)

wps.diff (214 bytes ) - added by ranok 18 years ago.
A diff of what I did to fx the auto update plugin feature
wp2.7fix.diff (214 bytes ) - added by ranok 18 years ago.
A fix for version 2.7.

Download all attachments as: .zip

Change History (9)

@ranok
18 years ago

A diff of what I did to fx the auto update plugin feature

#1 @DD32
18 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 @ranok
18 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.

@ranok
18 years ago

A fix for version 2.7.

#3 @ranok
18 years ago

  • Version 2.62.7

#4 @ryan
17 years ago

  • Component PluginsUpgrade/Install

#5 @Denis-de-Bernardy
17 years ago

  • Keywords has-patch commit added; plugins include_once 2.6.3 removed

+1 to the wps.diff patch, though.

#6 @Denis-de-Bernardy
17 years ago

  • Keywords reporter-feedback added; has-patch commit removed
  • Milestone 2.8Future Release

mm, nevermind that. this can't happen in 2.8 anyway (or then the folder is called something.php)

steps to reproduce the other issue would be useful.

#7 @Denis-de-Bernardy
17 years ago

  • Milestone Future Release
  • Resolutioninvalid
  • Status newclosed

closing as invalid until then.

Note: See TracTickets for help on using tickets.