Jump to content

Warning: strlen() expects parameter 1 to be string, array given in Path.php 133


Guy Verville
 Share

Recommended Posts

I constantly get this warning error 

PHP Warning: strlen() expects parameter 1 to be string, array given in...   Path.php 133

I wonder what can cause this problem. I am not sure it is related, but I use the TemplateEngineFactory module (with Twig)

Tracy Debugger catches the error. Always the same number of times : 5.

I have made a var_dump and I haven't seen anything suspect ($value seems ok, or null).

Any idea?

Link to comment
Share on other sites

This should be Paths.php, not Path.php right? It looks like something assigned an array to $config->paths->something. Dumping $key might get you on the right track of which "something" holds the array value PW complains about.

  • Like 2
Link to comment
Share on other sites

Bingo. The code in config.php is this:

$config->paths->customPaths = array(
  'plugins' => $config->urls->site . 'templates/plugins/', // Web vendors path
  'views' => $config->urls->site . 'templates/views/', // Web views path
  'styles' => $config->urls->site . 'assets/styles/', // Web styles path
  'scripts' => $config->urls->site . 'assets/scripts/', // Web scripts path
  'template_dir' => $config->urls->site .'templates/', // Web scripts path
);

Exactly 5.

My programmer created this. We will make a workaround. Thanks.

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...