[Solar-svn] Revision 3199

pmjones at solarphp.com pmjones at solarphp.com
Mon Jun 2 21:00:59 CDT 2008


Solar binary: [FIX] Call Solar::stop() when needed, and use PHP_EOL instead of newlines.


Modified: trunk/bin/solar
===================================================================
--- trunk/bin/solar	2008-06-03 02:00:09 UTC (rev 3198)
+++ trunk/bin/solar	2008-06-03 02:00:59 UTC (rev 3199)
@@ -159,9 +159,9 @@
 // was there a config file at all?
 if ($config) {
     $config = realpath($config);
-    echo "Using config file '$config'.\n";
+    echo "Using config file '$config'." . PHP_EOL;
 } else {
-    echo "Not using a config file.\n";
+    echo "Not using a config file." . PHP_EOL;
 }
 
 
@@ -181,8 +181,11 @@
 
 // execute the requested command
 try {
+    
     $console->exec();
+    Solar::stop();
     exit(0);
+    
 } catch (Solar_Controller_Console_Exception $e) {
     
     // find an exit code, if any
@@ -197,8 +200,11 @@
         $exit = -1;
     }
     
+    // stop Solar
+    Solar::stop();
+    
     // print the error message and exit
-    echo $e->getMessage() . "\n";
+    echo $e->getMessage() . PHP_EOL;
     exit($exit);
     
 } catch (Exception $e) {
@@ -217,7 +223,11 @@
         $exit = -1;
     }
     
+    // stop Solar
+    Solar::stop();
+    
     // print the error message and exit
-    echo $e . "\n";
+    echo $e . PHP_EOL;
     exit($exit);
+    
 }




More information about the Solar-svn mailing list