Plugin Author
Steve
(@steveatty)
Which version are you running because that line is taking the first element of an array (which is a stdClass) and extracting it. So it should be an array and not a stdClass.
Can you post your support information for me?
Wordbooker: 2.0.2
Wordbooker Schema: 2.1
WordPress: 3.2.1
PHP: 5.3.2
JSON Encode: PHP
JSON Decode: PHP
Curl Status: Curl is available and can access Facebook – All is OK
JSON Version: 1.2.1
SimpleXML library: 0.1 (provided by PHP)
HTTP Output Character Encoding: pass
Internal PHP Character Encoding: UTF-8
MySQL: 5.0.92
Database character_set_client : utf8
Database character_set_connection : utf8
Database character_set_database : utf8
Database character_set_filesystem : binary
Database character_set_results : utf8
Database character_set_server : utf8
Database character_set_system : utf8
Database character_sets_dir : /usr/share/mysql/charsets/
Database collation_connection : utf8_general_ci
Database collation_database : utf8_unicode_ci
Database collation_server : utf8_unicode_ci
Plugin Author
Steve
(@steveatty)
I’m wondering if 5.3.2 has changed something.
Can you try changing line 90 of wordbooker_cron.php
from
$fb_profile_info= $fb_profile_info[0];
to
if(is_array($fb_profile_info)){$fb_profile_info= $fb_profile_info[0];}
OK, I’ve done that. Is that all?
Plugin Author
Steve
(@steveatty)
Well if you do a Status Refresh and you don’t get the error then yes…
The problem is that I don’t have the problem with php 5.2.4 so I can’t debug the issue.
Now I get a different one
PHP Warning: array_merge() [function.array-merge]: Argument #1 is not an array in …/wp-content/plugins/wordbooker/includes/wordbooker_cron.php on line 203
This is with the latest version, 2.0.3 installed if it makes any difference.
And another one
PHP Fatal error: Cannot use object of type stdClass as array in …/wp-content/plugins/wordbooker/includes/wordbooker_cron.php on line 254
Plugin Author
Steve
(@steveatty)
The problem is that php 5.2 doesn’t do this.
It looks like the json_decode function has changed its form again .
The array merge is odd because I specifically set the arrays as empty before I do any processing so it should be there.
Does this mean this plugin is not compatible with PHP 5.3? According to php.net PHP 5.2 is no longer supported and the current stable release is 5.3
The array merge is odd because I specifically set the arrays as empty before I do any processing so it should be there.
Well, I assure you the error is in the server log.
Plugin Author
Steve
(@steveatty)
I did not say it was not compatible with 5.3 – just that it looks like PHP have, once again, changed the behaviour of the json_decode function (OR that it can be configured at the server level to behave differently) – I am on 5.2 as are over 95% of my users and until I upgrade my server I’m stuck with 5.2. I just need to catch where I’m having to grab the object out of the first element in the array and wrap them all in a logic check.
so, is there a solution for those 5% who are using a supported version of PHP?
Plugin Author
Steve
(@steveatty)