0 users online. Create an account or sign in to join them.Users


Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.


Closed#294: Finding datasource order produces lots of warnings in the log

In Symphony 2.0.7 and 2.0.8 alike there are tons of errors like this in the log:

2010/04/03 23:35:43 > WARNING: 2 - array_intersect() [<a href='function.array-intersect'>function.array-intersect</a>]: Argument #2 is not an array in file /var/www/www.example.com/symphony/lib/toolkit/class.frontendpage.php on line 427

It seems that this is caused by a simple typo in class.frontendpage.pgp. Line 427 is:

$dependenciesList[$handle] = @array_intersect($dsKeyArray, $dependencies);</code></pre>

but it should probably be:

$dependenciesList[$handle] = @array_intersect($dsKeyArray, $dependenciesList);

[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.

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?


This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.1
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details