amites Posted December 20, 2007 Share Posted December 20, 2007 Quick question: Had a site switched to PHP5.2 from 4.3 and now getting Warning: mktime() expects parameter 1 to be long, string given in /home/praise1/public_html/Helios/events/components/paypal.php on line 433 $startTime = date($hc_timeFormat, mktime($timepart[0], $timepart[1], $timepart[2])); Is there any way to keep the parameter as a variable? used rather widely throughout the site would rather not replace everything... Quote Link to comment https://forums.phpfreaks.com/topic/82454-php5-mktime-expects-parameter-to-be-long-string-given/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 20, 2007 Share Posted December 20, 2007 That sounds like a strict mode warning. Use type casting to see if it solves the problem - $startTime = date($hc_timeFormat, mktime((int)$timepart[0], (int)$timepart[1], (int)$timepart[2])); Quote Link to comment https://forums.phpfreaks.com/topic/82454-php5-mktime-expects-parameter-to-be-long-string-given/#findComment-419220 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.