0
Welcome Guest! Login
0 items Join Now

Wrong datatype for second argument

    • Beginner's Avatar
    • Beginner
    • Rocketeer
    • Posts: 81
    • Thanks: 0

    Wrong datatype for second argument

    Posted 12 years 5 months ago
    • Dear all,

      we use the template "TerranTribune" and have changed the provider.

      Now we have an error by using the editor function in the frontend, the error is:

      Warning: in_array() [
      function.in-array]: Wrong datatype for second argument in /homepages/37/d97651138/htdocs/blaetz-hp-2012/templates/rt_terrantribune/html/mod_menu/default.php on line 48


      The part of default.php (==> 3rd line):
      if ($item->type == 'alias' &&
      in_array($item->params->get('aliasoptions'),$path)
      || in_array($item->id, $path)) {
      $class .= ' active';
      }


      Does anyone know what the problem is? On the provider before we had no problems. It could be a problem with PHP?

      Thanks for help in advance,
      Daniel
    • prim's Avatar
    • prim
    • Preeminent Rocketeer
    • Posts: 17290
    • Thanks: 217

    Re: Wrong datatype for second argument

    Posted 12 years 5 months ago
    • Does it happen when you use another editor? Which PHP version are you using?
    • Please reply with a direct link to the issue & create a new thread for each new issue.

      A template is only as good as the content that goes into it ;) - DanG
    • Beginner's Avatar
    • Beginner
    • Rocketeer
    • Posts: 81
    • Thanks: 0

    Re: Wrong datatype for second argument

    Posted 12 years 5 months ago
    • Hi Prim,

      we use the JCE-Editor, the PHP version on the server is 5.2
      I mean we had installed the same editor on the prior server/provider.

      In the meantime I will restore a backup on my local machine to test the editor again.


      Regards,
      Daniel
    • Beginner's Avatar
    • Beginner
    • Rocketeer
    • Posts: 81
    • Thanks: 0

    Re: Wrong datatype for second argument

    Posted 12 years 5 months ago
    • Hi,

      I have restored a backup from our website to a local machine without problems, the JCE editor works and no error message are displayed.

      I'm a little bit confused, it seems to be a problem with PHP?


      Regards,
      Daniel
    • prim's Avatar
    • prim
    • Preeminent Rocketeer
    • Posts: 17290
    • Thanks: 217

    Re: Wrong datatype for second argument

    Posted 12 years 5 months ago
    • Your version of PHP is probably too old. I think it's over 2.5 years old.
    • Please reply with a direct link to the issue & create a new thread for each new issue.

      A template is only as good as the content that goes into it ;) - DanG
    • Beginner's Avatar
    • Beginner
    • Rocketeer
    • Posts: 81
    • Thanks: 0

    Re: Wrong datatype for second argument

    Posted 12 years 5 months ago
    • Hi,

      the error (or warning) is only given if the startpage is an article and you click on edit (frontend). So I mean this is an issue within the default.php (mod_menu).

      In the issue case the variable $path isn't set or is set to null and the check in_array show the warning because the second variable "$path" is null.

      Could anyone from the RocketTheme-Team can take a look into the default.php?

      This isn't an issue regarding the PHP version!

      Regards,
      Daniel
  • Re: Wrong datatype for second argument

    Posted 11 years 2 months ago
    • same issue here
      the menu is not displayed because of the class current on the pages generated by components - actually on all pages that are not directly linked to the menu

Time to create page: 0.075 seconds