Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
$this->Extensions array being overwritten on each iteration
When I log in as a Master Administration and go to Settings -> Manage Extensions, the Whispers extension shows up 11 times. When I look at the extensions directory, there are indeed 11 extensions, but only one of them (the last one, alphabetically) is Whispers.php.
I opened up controls/settings.php where the output for that listing is generated. On each iteration of the while loop that begins at line 753, I can do a print_r($Extension) just after line 802, and I see the details of all 11 extensions just as it should be. However, if I do a print_r($this->Extensions) just after line 802, I see that, on each iteration, $this->Extensions gains a new item, but every single previously added item in $this->Extensions is somehow overwritten with the new data from $Extension. So, by the time the while loop is finished, there are 11 items in $this->Extensions, but each of them are for the same extension (Whispers, in this case, because it's the last extension to be processed).
I've tried playing around with the code a bit, but this has me baffled. Perhaps you'll have better luck finding out where it's overwriting the previous array items in $this->Extensions.
0
This discussion has been closed.
Comments
But thanks for the awesome notes
$object =& new Object();
PHP 5 fixed this issue so that all objects are created by reference by default and you no longer need to use the =& operator.
You may want to investigate whether PHP 4.4 breaks this functionality in Vanilla, since it backports to the 4 series of the language the code from PHP 5 that fixes these object reference issues.
You really wanted to figure out what the problem was.