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

Search

Argument 2 passed to __() must be an array, integer given, called in /Sites/pcpc-control/symphony/lib/toolkit/data-sources/datasource.section.php on line 144 and defined /Sites/pcpc-control/symphony/lib/toolkit/class.lang.php line 10

5    *
6    * Provides an interface for translations and transliterations
7    */
8
9   // Translations
10  function __($string, array $tokens=NULL){
11      if(!class_exists('Lang') || !(Lang::Dictionary() instanceof Dictionary)) return vsprintf($string, $tokens);
12      return Lang::Dictionary()->translate($string, $tokens);
13  }
14  

FYI, this issue has been posted on the Symphony issues area. I’m just trying to get around this issue, and am having difficulty figuring it out.

Any help would be much appreciated.

Around line #138 in symphony/lib/toolkit/data-sources/datasource.section.php just replace this:

if($field_id != 'id' && !($fieldPool[$field_id] instanceof Field)){
                throw new Exception(
                    __(
                        'Error creating field object with id %1$d, for filtering in data source "%2$s". Check this field exists.', 
                        $field_id, 
                        $this->dsParamROOTELEMENT
                    )
                );
            }

with:

if($field_id != 'id' && !($fieldPool[$field_id] instanceof Field)){
                throw new Exception(
                    __(
                        'Error creating field object with id %1$d, for filtering in data source "%2$s". Check this field exists.', 
                        array($field_id, 
                        $this->dsParamROOTELEMENT)
                    )
                );
            }

OK. That worked. Thank you very, very much!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • 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