Write news in ACP

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Write news in ACP

      Hello.

      I have 2moons 1.9 and when I try to write news i got an error:

      WARNING
      Message: count(): Parameter must be an array or an object that implements Countable
      File: /includes/pages/adm/ShowNewsPage.php
      Line: 68
      URL: aurora-orbit.de/admin.php?page=news
      PHP-Version: 7.2.17
      PHP-API: cgi-fcgi
      2Moons Version: 1.9.git
      Debug Backtrace:
      #0 /includes/pages/adm/ShowNewsPage.php(68): errorHandler(2, 'count(): Parame...', 'FILEPATH ...', 68, Array)
      #1 /admin.php(151): ShowNewsPage()
      #2 {main}



      who is that to fix?

      best regards
    • it's cause of your php version
      the command 'count' has been changed
      in php < 7 count gave back 0 if array/object was not defined, now it throws an error
      go to line 68 and use something like
      sprintf($LNG['nws_total'], isset($NewsList) ? count($NewsList) : 0),