Finding datasource order produces lots of warnings in the log
A for , submitted by michael-e on 04 April 2010
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#294: Finding datasource order produces lots of warnings in the log
I assume that logging every warning (like the above and in issue #295 alike) is intended? (Might be a good thing to find any quirks in Symphony’s core.)
But I find it rather irritating to see all these warnings in the log.
[EDIT]: Forget this — see next post!
What about this: You could cast $dependencies
as an array. Replacing line 427 by:
$dependenciesList[$handle] = @array_intersect($dsKeyArray, (array)$dependencies);
stops the errors in the log.
I found the problem!
This issue does not occur an default installations.
It turns out that every datasource returns a dependencies array. Every one? No, not every one — on the installation in question I am using the Server Headers extension. This extension is missing the standard __construct
function:
public function __construct(&$parent, $env=NULL, $process_params=true){ parent::__construct($parent, $env, $process_params); $this->_dependencies = array(); }
If I add this, everything is OK.
So this issue is not a Symphony issue. I will post an extension bug report.
[EDIT]: Bug report on GitHub.
Surely the most futureproofed fix is for the dependencies array to be cast as an array in class.datasource.php
from which everything else inherits?
http://github.com/symphony/symphony-2/blob/master/symphony/lib/toolkit/class.datasource.php#L12
This issue is closed.
In Symphony 2.0.7 and 2.0.8 alike there are tons of errors like this in the log:
It seems that this is caused by a simple typo inclass.frontendpage.pgp
. Line 427 is:but it should probably be:[EDIT]: Scrap that. I was too tired yesterday evening… Anyway the problem seems to be that
$dependenciesList
may be empty/NULL. I have changed the title of this issue.