I have started some debugging of this issue. By adding a var_dump like this in line 29:
Code:
$bfa_ata = get_option('bfa_ata4');
echo "<pre>";
var_dump($bfa_ata);
echo "</pre>";
I get an output starting with this for $bfa_ata:
Code:
object(stdClass)#114 (267) {
["use_bfa_seo"]=>
string(2) "No"
["homepage_meta_description"]=>
...
EDIT:
The output from my dev system for this is:
Code:
array(267) {
["use_bfa_seo"]=>
string(2) "No"
["homepage_meta_description"]=>
string(0) ""
...
So, to me it seems like the error message as showed in my initial statement indeed is correct. The result of the get_option call is NOT an array, but an object. So it is reasonable that the following:
Code:
$bfa_ata_widget_areas = $bfa_ata['bfa_widget_areas'];
causes such an error, because it treats $bfa_ata like an array.
That still leaves me wondering why I don't see this on my test system. But at least it seems like this is a bug. Anybody with more PHP/atahualpa development experience who would like to give a statement on this?
OK, taking this further: If I change this to the correct OO syntax, i.e.
Code:
$bfa_ata_widget_areas = $bfa_ata->bfa_widget_areas;
The error is gone. Next error up ahead is:
Code:
[Fri Oct 15 17:42:18 2010] [error] [client 79.196.247.50] PHP Fatal error: Cannot use object of type stdClass as array in /var/www/vierpfeile/htdocs/wordpress-2.9.2/wp-content/themes/atahualpa353/functions/bfa_get_options.php on line 526
There I can see the same problem. But in fact, the whole code uses the array syntax on $bfa_ata. So I do not believe that this is the real problem.
Question: Given the very "mutating" history of PHP - Does anybody know if this is another episode of the ever-changing PHP??? Maybe there's some kind of switch that forces my production system to behave like this?
BTW - now that I am back in front of the system: The exact version of the prod system's php is:
PHP Version 5.2.12-pl0 with suhosin 0.9.7
Maybe there are some known issues with this combination?