We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36704
    • 131 Posts
    Hi Bobray,
    I am uploading my works from MAMP to live server,

    When i was tried to add new resource it gives me this warning.
    Warning: mktime() expects parameter 6 to be long, string given in /home/core/components/newspublisher/model/newspublisher/newspublisher.class.php on line 1101

    On my localhost everything was fine.
    Any idea how to fix this problem?

    Need your help again...
    Best regards, [ed. note: alyainec last edited this post 13 years, 10 months ago.]
      • 3749
      • 24,544 Posts
      Try changing line 1101 of that file from this:

      $timestamp = mktime(0, 0, 0, substr($timeString,5,2), substr($timeString,8,2), substr($timeString,0,4));
      

      To this:

      $timestamp = mktime(0, 0, 0, (int) substr($timeString,5,2), (int) substr($timeString,8,2), (int) substr($timeString,0,4));
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36704
        • 131 Posts
        It's working now and the error was removed. Thank you so much for your help...

        Do you think it was a bug in NP or in the core of MODx 2.2.6?
        On my localhost i use ver. 2.2.5 but on live server i used the 2.2.6

          • 3749
          • 24,544 Posts
          It may be a bug in NP, but the server, the PHP version, or the error reporting level could be involved, but the fix should prevent it in any case.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting