Joomla!, Wordpress tips for building your site

Print PHP Warning (Invalid CRT parameters detected ) by qTranslate on Wordpress

Published on| December 28th, 2011 | 1 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.

%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





Comments

One Response to “Print PHP Warning (Invalid CRT parameters detected ) by qTranslate on WordPress”

  1. wordpress多言語化プラグイン『qTranslate』 | remember-it
    October 23rd, 2012 @ 19:51:32

    […] WordPress の qTranslate で PHP Warning (Invalid CRT parameters detected ) が出力される カテゴリー: Plug-in, WordPress   作成者: citron パーマリンク […]

Leave a Reply








Transrator

Recent Posts

Categories

Tag Cloud

execute remove フロントページ 投稿ページ トップページ install WIndows Note Convert META generator 日付 donwload file manage multibyte utf-8 unicode shiftjis euc console サイトマップ 問題 ParmaLink Redirect パーマリンク はみ出る pre テンプレート テーマ タグクラウド マルチランゲージ リダイレクト PHP(タグ) タグ table control HTML(タグ) コマンド 国際化(翻訳) SQLite(タグ) MySQL(タグ) qTranslate プラグイン(タグ) Wordpress(タグ)

Links

Site Description

Joomla!, Wordpress as CMS using a site building, site management, software usage to describe the development tips.

  • はてなブックマークへ追加する
  • Facebookでシェアする
  • twitter でつぶやく
  • Google Plusでシェアする
  • Pocketでシェアする
ページトップへ