0

I've just installed qTranslate and it works like a doll. Only problem is that date bug that's been around for a while. Everywhere I've found via Google says it is due to the two percent signs in qtrans_ulils.php, for $strftime_parameters[]. However, if I correct this to only one percent, I don't get the problem anymore, but I do get a huge hunk of an error...CRT, it claims, in the qtrans_core.php.

Warning: Invalid CRT parameters detected in C:\var\htdocs\maud\wp-content\plugins\qtranslate\qtranslate_core.php on line 455 Warning: Invalid CRT parameters detected in C:\var\htdocs\maud\wp-content\plugins\qtranslate\qtranslate_core.php on line 455 Warning: Invalid CRT parameters detected in C:\var\htdocs\maud\wp-content\plugins\qtranslate\qtranslate_core.php on line 455 Warning: Invalid CRT parameters detected in C:\var\htdocs\maud\wp-content\plugins\qtranslate\qtranslate_core.php on line 455 Warning: Invalid CRT parameters detected in C:\var\htdocs\maud\wp-content\plugins\qtranslate\qtranslate_core.php on line 455 at 09:06 PM

I can't really comprehend why it's doing this...help.

Red

1 Answers1

0

Try this: https://was955.wordpress.com/2012/11/27/php-warning-invalid-crt-parameters-detected-by-qtranslate-on-wordpress/

Here's a quote from the site:

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‘ (around line 455) like below codes:

$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 problem. 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

Laurel
  • 5,965
  • 14
  • 31
  • 57
Giraldi
  • 16,451
  • 6
  • 33
  • 52