Jump to content

Array to string conversion


dvir

Recommended Posts

THere is nothing as strings on that line. DId you modify your dispatcher?

Also, check if you have any module hooked to moduleRoutes

i dont have any moduleRoutes ...i'm searching in position , but i cant see module in that name

Link to comment
Share on other sites

hi ,

 

i've looked in the error_log , and here is all the error : 

 

[04-Sep-2015 13:07:44 Israel] PHP Notice: Array to string conversion in /home/dviry/public_html/classes/Dispatcher.php on line 676
[04-Sep-2015 13:07:44 Israel] PHP Notice: Array to string conversion in /home/dviry/public_html/classes/Dispatcher.php on line 676
[04-Sep-2015 13:07:45 Israel] PHP Notice: Undefined index: newProducts in /home/dviry/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 46
[04-Sep-2015 13:07:45 Israel] PHP Notice: Trying to get property of non-object in /home/dviry/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 46

Link to comment
Share on other sites

i dont have any moduleRoutes ...i'm searching in position , but i cant see module in that name

 i found IT ! 

 

but it raise a lot of questions :

 

when i turned off the option "Friendly URL" - the error disappear ! 

 

but why ? 

is it good for an e-commerce website , that all the time change product  - to work with Friendly URL?  

or i better find what is the problem , and i should work with Friendly URL? 

 

 

hope to get from you the answer what do to ...

 

thanks 

Link to comment
Share on other sites

Because it's not using the dispatcher in that case. Can you check what you have at line 676 of the file and post t here?

  // Build an url which match a route

  if ($this->use_routes || $force_routes)

  {

 

   $url = $route['rule'];

   $add_param = array();

   foreach ($params as $key => $value)

   {

    if (!isset($route['keywords'][$key]))

    {

     if (!isset($this->default_routes[$route_id]['keywords'][$key]))

      $add_param[$key] = $value;

    }

    else

    {

     if ($params[$key])

      $replace = $route['keywords'][$key]['prepend'].$params[$key].$route['keywords'][$key]['append'];  ----- THIS IS LINE 676

     else

      $replace = '';

     $url = preg_replace('#\{([^{}]*:)?'.$key.'(:[^{}]*)?\}#', $replace, $url);

    }

   }

   $url = preg_replace('#\{([^{}]*:)?[a-z0-9_]+?(:[^{}]*)?\}#', '', $url);

   if (count($add_param))

    $url .= '?'.http_build_query($add_param, '', '&');

  }
Edited by dvir (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...