Guest Posted August 9, 2009 Share Posted August 9, 2009 i am trying to impliment the ebay listing addon and i am getting this error on my website ( www.pcncautomation.net ) when the button is clicked Warning: mktime() expects parameter 2 to be long, string given in /home/rvrwind/public_html/includes/modules/current_auctions_module.php on line 116 Warning: mktime() expects parameter 4 to be long, string given in /home/rvrwind/public_html/includes/modules/current_auctions_module.php on line 116 but after the warnings it displays the ebay listing i have here is the code that is in current_auctions_module.php $seperate[0] = str_replace("Oct", "10", $seperate[0]); $seperate[0] = str_replace("Nov", "11", $seperate[0]); $seperate[0] = str_replace("Dec", "12", $seperate[0]); $month = $seperate[0]; $day = $seperate[1]; $year = $seperate[2]; $hour = $seperate[3] + AUCTION_TIMEZONE; $minute = $seperate[4]; $second = $seperate[5]; // mktime is the marked time, and time() is the current time. $target = mktime($hour,$minute,$second,$month,$day,$year); ( this is line 116 ) $diff = $target - time(); $days = ($diff - ($diff % 86400)) / 86400; $diff = $diff - ($days * 86400); $hours = ($diff - ($diff % 3600)) / 3600; $diff = $diff - ($hours * 3600); $minutes = ($diff - ($diff % 60)) / 60; $diff = $diff - ($minutes * 60); $seconds = ($diff - ($diff % 1)) / 1; // next we put it into a presentable format what do i need to do to get rid of this error ? Quote Link to comment Share on other sites More sharing options...
germ Posted August 9, 2009 Share Posted August 9, 2009 Typecast the parameters: $target = mktime((int)$hour,(int)$minute,(int)$second,(int)$month,(int)$day,(int)$year); Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted August 9, 2009 Share Posted August 9, 2009 thank you very much that fixed it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.