WordPress.org

Ready to get started?Download WordPress

Forums

Socialize
[resolved] error on page update (6 posts)

  1. Paul de Wouters
    Human Made
    Posted 2 years ago #

    I unchecked all the options on a page, and when I updated it threw these errors:

    Warning: Invalid argument supplied for foreach() in .../wp-content/plugins/socialize/admin/socialize-admin.php on line 88
    
    Warning: Invalid argument supplied for foreach() in .../wp-content/plugins/socialize/admin/socialize-admin.php on line 88
    
    Warning: Cannot modify header information - headers already sent by (output started at .../wp-content/plugins/socialize/admin/socialize-admin.php:88) in /home/sidera/public_html/pleasehiremeautomattic.com/wp-includes/pluggable.php on line 934

    http://wordpress.org/extend/plugins/socialize/

  2. Jon Bishop
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks Paul I'll look into this.

  3. Midmere
    Member
    Posted 2 years ago #

    Hi jonbishop!
    Did you have chance to look into this problem?

  4. happyches
    Member
    Posted 2 years ago #

    Getting same error, default wordpress theme, barely any plugins, wordpress 3.2.1. Would love to solve this, it scares the client..

  5. shawnkhall
    Member
    Posted 2 years ago #

    The post-edit hook being used isn't properly validating that a value is being passed before trying to read it as an array. Here's a fix. Open the file "/wp-content/socialize/admin/socialize-admin.php" and find lines 88 to 95, which should be:

    foreach($_POST['socialize_buttons'] as $button){
    			if(($button > 0)){
    				array_push($socializemetaarray, $button);
    			} else{
    				//$hs_settings['socialize_buttons'][$formid] = htmlentities(stripslashes($form));
    			}
    			$formid++;
    		}

    We're going to add a check to it to ensure that the variable is being passed first, so replace it with this:

    if(isset($_POST['socialize_buttons'])) {
    			foreach($_POST['socialize_buttons'] as $button){
    				if(($button > 0)){
    					array_push($socializemetaarray, $button);
    				} else{
    					//$hs_settings['socialize_buttons'][$formid] = htmlentities(stripslashes($form));
    				}
    				$formid++;
    			}
    		}
  6. Jon Bishop
    Member
    Plugin Author

    Posted 2 years ago #

    I have a new version very close to being finished. Development stalled temporarily because of a potential change in ownership but I've ultimately decided to continue developing the plugin.

    I'm now actively developing the plugin on github so anyone can follow my progress. https://github.com/jonbish/socialize

    Once the next version is tested and complete I will move the stable version to WordPress.org

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags