Print PHP Warning (Invalid CRT parameters detected ) by qTranslate on Wordpress
Published on| December 28th, 2011 | No Comment.
If you use qTranslate plugin with WordPress, you may see many warning message like below information on Apache and PHP with Windows OS.
qTranslate Warning: Invalid CRT parameters detected in ... \wp-content\plugins\qtranslate\qtranslate_core.php on line 447
I will give you 1 method to resolve this problem if you want to remove many warning messages.
How to remove warning messages
if you want to remove many warning messages, you should edit ‘… \wp-content\plugins\qtranslate\qtranslate_core.php‘ like below codes.
453 454 455 456 457 458 459 460 461 | $search[] = '/(([^%])%4|^%4)/'; $replace[] = '${2}'.$date; // date U $format = preg_replace($search,$replace,$format); // Add Windows if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $format = str_replace('%P','%p',$format); } return $before.strftime($format, $date).$after; |
It is very easy probrem.
You cannot use ‘%P’ that format in strftime function ( PHP ) with Windows OS.
You should use ‘%p’ if you want to remove warning messages with Windows OS.
You cannot use ‘%P’ that format in strftime function ( PHP ) with Windows OS.
You should use ‘%p’ if you want to remove warning messages with Windows OS.
%p UPPER-CASE 'AM' or 'PM' based on the given time Example: AM for 00:31, PM for 22:23 %P lower-case 'am' or 'pm' based on the given time Example: am for 00:31, pm for 22:23
You might also like:
Trackback URL
After Admin approves this comment, it will be shown.
Comments
Leave a Reply

