wdgdc / CDN-Sync-Tool

FORK NO LONGER MAINTAINED! - WordPress plugin to sync files to a CDN (S3/Cloudfiles/FTP/NetDNA/WebDAV)
http://catn.com/vcluster/plugins/cdn-sync-tool/
9 stars 7 forks source link

PHP Fatal error - syncFiles - cdn-sync-tool.php on line 113 #8

Closed panik77 closed 10 years ago

panik77 commented 11 years ago

I just installed your forked plugin on a WordPress 3.6.1 multisite, running on IIS 7.5 with PHP 5.4

I get the following PHP error when I activate the plugin: [17-Oct-2013 22:15:48 UTC] PHP Fatal error: Call to a member function syncFiles() on a non-object in C:\inetpub\wwwroot\wp-content\plugins\cdn-sync-tool\cdn-sync-tool.php on line 113

MikeNGarrett commented 11 years ago

It looks like this is legacy code leftover from the previous version of this plugin. It's setting $core on line 50 of the same file and then trying to use that object later in the code by calling php's $GLOBAL variable.

We'll need to change this to handle invoking this object in a better way.

tedroche commented 10 years ago

A quick fix is to add the line "global $core" before the original assignment and change function hourlySync() {

MikeNGarrett commented 10 years ago

Fixed thanks to @tedroche.