Tíquete #9750

Warning at module installation
: 2007-01-09 16:58 Última Atualização: 2007-01-17 18:57

Relator:
Dono:
Estado:
Fechado
Componente:
(Nenhum)
Marcos:
(Nenhum)
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
Nenhum

Details

module いんすとーる時に sql ふぁいるが空っぽだと
/modules/legacy/admin/class/Legacy_SQLScanner.class.php
L28

foreach (array_keys($this->mTokens) as $key) {
ここで

Warning [PHP]: array_keys(): The first argument
should be an array in
file ...\modules\legacy\admin\class\Legacy_SQLScanner.c
lass.php line 28
Warning [PHP]: Invalid argument supplied for foreach
() in
file ...\modules\legacy\admin\class\Legacy_SQLScanner.c
lass.php line 28

と怒られちゃいます
foreach の前に $this->mTokens をちぇっくしてもいいけど
/modules/legacy/lib/EasyLex/EasyLex_SQLScanner.class.ph
p L91

var $mTokens;

var $mTokens = array();
なかんじのほうがよさそうかなぁ?
ほかのめんばはちゃんと初期化されてるし・・・

Ticket History (3/4 Histories)

2007-01-10 10:52 Updated by: minahito
Comentário
Logged In: YES
user_id=8353

[EN]
If the specified SQL file is empty on module installation,
Legacy_SQLScanner.class.php L28 warns.

EasyLex_SQLScanner should initialize all members.
2007-01-10 11:02 Updated by: minahito
Comentário
Logged In: YES
user_id=8353

[EN]
You're right. EasyLex_SQLScanner should initialize all
members on their declarations. I had not decided the place
where I should write the initializing code, because I was in
between PHP spec and C++ spec. But, I we should write
initializing code on the declaration under PHP spec, now.

[JA]
おっしゃるとおりで、EasyLex_SQLScanner はすべてのメンバをそ
の宣言時に初期化するべきですね。これまで宣言時にできる宣言は
やってしまうか、コンストラクタのみで行うか、 PHP スタイルと
C++ スタイルの間をふらふらしていましたが、 PHP 仕様の下、可
能な初期化は宣言時にやってしまうのがいいと今は考えています。
2007-01-17 16:47 Updated by: minahito
  • Dono Update from (Nenhum) to minahito
  • Resolução Update from Nenhum to Accepted
Comentário
Logged In: YES
user_id=8353


[JA](Junk)
まちがえて bug fix #7892 で流してしまった...
2007-01-17 18:57 Updated by: minahito
  • Ticket Close date is changed to 2007-01-17 18:57
  • Resolução Update from Accepted to Fixed
  • Estado Update from Aberto to Fechado

Attachment File List

No attachments

Editar

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