待辦事項 #3069

smartyのerror_reportingのコントロールが効かない
啟用日期: 2003-09-24 19:46 最後更新: 2004-01-07 22:06

回報者:
負責人:
(無)
類型:
狀態:
關閉
元件:
(無)
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:

細節

Xoops2.0.4 errorhandler.phpでエラーハンドルしているが、
そのため、
[code]/class/smarty/Smarty.class.phpline 1068
$_smarty_old_error_level = $this->debugging ?
error_reporting() :error_reporting(error_reporting() &
~E_NOTICE);
[/code]
しかし、そのエラーハンドル処理のなかで、error_reportingの
値が、処理に反映されるようにしていないため、Smartyの
E_NOTICEメッセージが出る。
http://xoops.s22.xrea.com:8080/modules/newbb/viewtopic.
php?topic_id=86&forum=9
<変更案>下記案は、あまり良い例ではないけど
errorhandler.phpで、カレントのerror_reporting値を参照し
て、表示を出力をコントロールする必要があると思います。
[code]
/class/errorhandler.php from line 98 /**
* Handle an error * * @param array
$error Associative array containing error info
* @access public * @return void */
function handleError($error) {
if ($error['errno'] == E_NOTICE){
$_old_error_level = error_reporting(E_ALL);
if (($_old_error_level ==
0)||($_old_error_level == (E_ALL ^ E_NOTICE))){
//continue;
} else { $this-
>_errors[] = $error; }
error_reporting($_old_error_level);
} if ($error
['errno'] == E_USER_ERROR) {
$this->_isFatal = true;
exit(); } }
[/code]

Ticket History (3/6 Histories)

2004-01-07 22:06 Updated by: onokazu
  • Ticket Close date is changed to 2004-01-07 22:06
  • 處理結果 Update from to 修正
  • 狀態 Update from 開啟 to 關閉
評語
Logged In: YES
user_id=754

error_reportingが外部からも反映されるように修正しました。
2008-12-06 15:01 Updated by: None
評語
hello, good site.
2009-03-01 18:00 Updated by: None
評語
Beautiful site! momrf
2009-03-07 20:30 Updated by: None
評語
I like your work! 000-easter-egg-hunt-spring-festival.016qet.us/ ">10 iwcey
2009-03-07 21:40 Updated by: None
評語
Great portal! 9-10-little-rabbits-easter.016qet.us/ ">1 xzmor
2009-03-17 02:07 Updated by: None
評語
Beautiful portal! 000.f37rj8.us/ ">Patrick deuel i weigh 1 xcgfm

Attachment File List

No attachments

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入