Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8140 closed defect (bug) (invalid)

Auto update plugin breaks plugins

Reported by: ranok's profile ranok 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.

Attachments (2)

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

Download all attachments as: .zip

Change History (9)

@ranok
16 years ago

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

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

@ranok
16 years ago

A fix for version 2.7.

#3 @ranok
16 years ago

  • Version changed from 2.6 to 2.7

#4 @ryanLead Tester
16 years ago

  • Component changed from Plugins to Upgrade/Install

#5 @Denis-de-Bernardy
16 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
16 years ago

  • Keywords reporter-feedback added; has-patch commit removed
  • Milestone changed from 2.8 to Future 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
16 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

closing as invalid until then.

Note: See TracTickets for help on using tickets.