Author: Tobias Schlitt
Date: 2007-04-07 15:29:40 +0200 (Sat, 07 Apr 2007)
New Revision: 4822

Log:
- Added missing exception on invalid result access.
- Fixed default usage in YesNoQuestionFactory.

Modified:
   trunk/ConsoleTools/src/dialog/question_dialog.php

Modified: trunk/ConsoleTools/src/dialog/question_dialog.php
===================================================================
--- trunk/ConsoleTools/src/dialog/question_dialog.php   2007-04-07 10:08:13 UTC 
(rev 4821)
+++ trunk/ConsoleTools/src/dialog/question_dialog.php   2007-04-07 13:29:40 UTC 
(rev 4822)
@@ -65,6 +65,10 @@
      */
     public function getResult()
     {
+        if ( $this->result === null )
+        {
+            throw new ezcConsoleNoValidDialogResultException();
+        }
         return $this->result;
     }
 
@@ -122,7 +126,7 @@
         $opts->showResults = true;
         $opts->validator = new ezcConsoleQuestionDialogCollectionValidator(
             array( "y", "n" ),
-            null,
+            $default,
             ezcConsoleQuestionDialogCollectionValidator::CONVERT_LOWER
         );
 

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to