fabacab / tumblr-crosspostr

:left_right_arrow: Tumblr Crosspostr is a bi-directional WordPress and Tumblr bridge inspired by Tumblrize.
https://wordpress.org/plugins/tumblr-crosspostr/
9 stars 3 forks source link

PHP 5.6.x compatability #20

Closed avcascade closed 9 years ago

avcascade commented 9 years ago

For future reference, Tumblr Crosspostr gives the following warnings when being activated in a PHP 5.6.x environment:

Warning: Invalid argument supplied for foreach() in /home/someuser/somesite/wp-content/plugins/tumblr-crosspostr/tumblr-crosspostr.php on line 77

Warning: Cannot modify header information - headers already sent by (output started at /home/someuser/somesite/wp-content/plugins/tumblr-crosspostr/tumblr-crosspostr.php:77) in /home/someuser/somesite/wp-includes/option.php on line 772

Warning: Cannot modify header information - headers already sent by (output started at /home/someuser/somesite/wp-content/plugins/tumblr-crosspostr/tumblr-crosspostr.php:77) in /home/someuser/somesite/wp-includes/option.php on line 773

These warnings are not seen when activating in a PHP 5.5.x environment.

fabacab commented 9 years ago

Hm. Are you sure this is actually a difference in PHP? Line 77 of the current release as of this filing is inside a pretty old migration function. Is it possible you activated the plugin on PHP 5.6.x but then used the same database when activating from a PHP 5.5.x? If so, it's probable this issue is simply a minor bug in Tumblr Crosspostr, not a difference with PHP's behavior in foreach loops.

fabacab commented 9 years ago

This isn't a compatibility issue, it's just a different symptom caused by #21.