WEBアプリケーションの開発中不思議な現象に遭遇。環境は
Ethna-2.5.0-preview5
Smarty Version 2.6.26
PHP Version 5.1.6
CentOS release 4.6 (Final)
view の preforward() 内の先頭に、Ethna::raiseNotice() を記述すると次のメッセージが出力される。
問題を切り分けると、次のような結果に。
Ethna-2.5.0-preview5
Smarty Version 2.6.26
PHP Version 5.1.6
CentOS release 4.6 (Final)
view の preforward() 内の先頭に、Ethna::raiseNotice() を記述すると次のメッセージが出力される。
Notice: Undefined index: file in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 195 Notice: Undefined index: line in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 202Ethna のコアである Ethna_Plugin_Logwriter のログ出力箇所情報取得 _getBacktrace() の debug_backtrace() で、"file"と"line" 要素が取得できていないらしい。
問題を切り分けると、次のような結果に。
APPID のプロジェクト生成直後デフォルトアクションのビュー
/webapp/APPID/app/view/Index.php
/webapp/APPID/etc/APPID-ini.php
'log_level' => 'debug',
とするだけで再現し、Ethna-2.5.0-preview3 にダウングレードすれば出なくなることが判明。
エラー詳細
http://ml.ethna.jp/mailman/listinfo/users
に報告しましたら、2時間ほどで修正が公開されました。早っ!
http://git.sourceforge.jp/view?p=ethna/ethna.git;a=commitdiff;h=8a67056d830deff738548b6f42957b4847b09481#patch2
/webapp/APPID/app/view/Index.php
function preforward(){ Ethna::raiseNotice( "★" ); }設定ファイルのパラメータ
/webapp/APPID/etc/APPID-ini.php
'log_level' => 'debug',
とするだけで再現し、Ethna-2.5.0-preview3 にダウングレードすれば出なくなることが判明。
エラー詳細
APPID[19496](DEBUG): Ethna_Controller.Ethna_Controller(/lib/Ethna/class/Ethna_Controller.php:803): plugin file is found in search: [/webapp/APPID/lib/Ethna/class/Plugin/Logwriter/Echo.php] APPID[19496](DEBUG): Ethna_Controller.Ethna_Controller(/lib/Ethna/class/Ethna_Controller.php:803): plugin class [Ethna_Plugin_Logwriter_Echo] is defined APPID[19496](DEBUG): Ethna_Controller._getActionName(/lib/Ethna/class/Ethna_Controller.php:922): form_action_name[] APPID[19496](DEBUG): Ethna_Controller._getActionName(/lib/Ethna/class/Ethna_Controller.php:922): -> default_action_name[index] APPID[19496](DEBUG): Ethna_Controller._getActionName(/lib/Ethna/class/Ethna_Controller.php:922): <<< action_name[index] >>> APPID[19496](DEBUG): Ethna_Controller._getAction(/lib/Ethna/class/Ethna_Controller.php:928): action [index] is not defined -> try default APPID[19496](DEBUG): Ethna_Controller.getDefaultActionPath(/lib/Ethna/class/Ethna_Controller.php:1916): default action path [Index.php] APPID[19496](DEBUG): Ethna_Controller.getDefaultActionPath(/lib/Ethna/class/Ethna_Controller.php:1494): default action path [Index.php] APPID[19496](DEBUG): Ethna_Controller.getDefaultActionClass(/lib/Ethna/class/Ethna_Controller.php:1339): default action class [APPID_Action_Index] APPID[19496](DEBUG): Ethna_Controller.getDefaultFormClass(/lib/Ethna/class/Ethna_Controller.php:1343): default action class [APPID_Form_Index] APPID[19496](DEBUG): Ethna_Controller.getDefaultViewPath(/lib/Ethna/class/Ethna_Controller.php:1988): default view path [Index.php] APPID[19496](DEBUG): Ethna_Controller.getDefaultViewClass(/lib/Ethna/class/Ethna_Controller.php:1612): default view class [APPID_View_Index] Notice: Undefined index: file in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 195 Notice: Undefined index: line in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 202 APPID[19496](NOTICE): APPID_View_Index.preforward(:): [PHP] E_NOTICE: Undefined index: file in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 195 Notice: Undefined index: file in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 195 Notice: Undefined index: line in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 202 APPID[19496](NOTICE): APPID_View_Index.preforward(:): [PHP] E_NOTICE: Undefined index: line in /webapp/APPID/lib/Ethna/class/Plugin/Logwriter.php on line 202 APPID[19496](NOTICE): APPID_View_Index.preforward(:): ★ [ERROR CODE(1)]追記:その後、メーリングリスト
http://ml.ethna.jp/mailman/listinfo/users
に報告しましたら、2時間ほどで修正が公開されました。早っ!
http://git.sourceforge.jp/view?p=ethna/ethna.git;a=commitdiff;h=8a67056d830deff738548b6f42957b4847b09481#patch2