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

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#289: Argument 2 passed to __() must be an array, integer given

Argument 2 passed to __() must be an array, integer given, called in C:xampphtdocspcpc.orgsymphony-2symphonylibtoolkitdata-sourcesdatasource.section.php on line 144 and defined
C:xampphtdocspcpc.orgsymphony-2symphonylibtoolkitclass.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  

Looks as if alpacaaa found the solution

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
                    )
                );
            }

and replace 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)
                    )
                );
            }

I’ve integrated Alpacaaa’s fix in this commit

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