OSDN Git Service

- fixed bug non-existent ethna command emits PHP FATAL error.
authorYoshinari Takaoka <mumumu@mumumu.org>
Tue, 21 Jul 2009 12:24:10 +0000 (21:24 +0900)
committerYoshinari Takaoka <mumumu@mumumu.org>
Tue, 21 Jul 2009 12:24:10 +0000 (21:24 +0900)
CHANGES
bin/ethna_handle.php

diff --git a/CHANGES b/CHANGES
index 9501ef5..f2478d2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,8 @@
 - PROJECT_DIR/lib/Ethna/extlib 以下にファイルを設置するタイプのプラグインを pear-local などでインストールすると、それ以後
   ethnaコマンドが使えなくな問題を修正
 - 新しいプラグインの命名規則に従っていない古いプラグインを別物として読み込もうとしてクラス名がかぶる問題を修正(#17875) thanks: id:okonomi
+- 存在しない(or 削除された) ethnaコマンドを指定すると Fatal Error が起きるバグを修正 (thanks:kondo_)
+-- http://sourceforge.jp/ticket/browse.php?group_id=1343&tid=17894
 
 ** 2.5.0-preview5
 
index 4a6417d..8f91eab 100644 (file)
@@ -57,8 +57,12 @@ $handler =& $eh->getHandler($id);
 $handler->eh =& $eh;
 if (Ethna::isError($handler)) {
     printf("no such command: %s\n\n", $id);
-    _Ethna_HandleGateway_ShowUsage();
-    exit(1);
+    $id = 'help';
+    $handler =& $eh->getHandler($id);
+    $handler->eh =& $eh;
+    if (Ethna::isError($handler)) {
+       exit(1);  //  should not happen.
+    } 
 }
 
 // don't know what will happen:)