瀏覽代碼

sanitize die (exit)

stealth35 14 年之前
父節點
當前提交
cee94be277

+ 2 - 2
src/Symfony/Bundle/DoctrineMongoDBBundle/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php

@@ -20,10 +20,10 @@ class CreateHydratorDirectoryPass implements CompilerPassInterface
         $hydratorCacheDir = $container->getParameter('doctrine.odm.mongodb.hydrator_dir');
         if (!is_dir($hydratorCacheDir)) {
             if (false === @mkdir($hydratorCacheDir, 0777, true)) {
-                die(sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)));
+                exit(sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)));
             }
         } elseif (!is_writable($hydratorCacheDir)) {
-            die(sprintf('Unable to write in the Doctrine Hydrator directory (%s)', $hydratorCacheDir));
+            exit(sprintf('Unable to write in the Doctrine Hydrator directory (%s)', $hydratorCacheDir));
         }
     }
 

+ 2 - 2
src/Symfony/Bundle/DoctrineMongoDBBundle/DependencyInjection/Compiler/CreateProxyDirectoryPass.php

@@ -20,10 +20,10 @@ class CreateProxyDirectoryPass implements CompilerPassInterface
         $proxyCacheDir = $container->getParameter('doctrine.odm.mongodb.proxy_dir');
         if (!is_dir($proxyCacheDir)) {
             if (false === @mkdir($proxyCacheDir, 0777, true)) {
-                die(sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)));
+                exit(sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)));
             }
         } elseif (!is_writable($proxyCacheDir)) {
-            die(sprintf('Unable to write in the Doctrine Proxy directory (%s)', $proxyCacheDir));
+            exit(sprintf('Unable to write in the Doctrine Proxy directory (%s)', $proxyCacheDir));
         }
     }
 

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/Tests/Kernel.php

@@ -23,10 +23,10 @@ class Kernel extends BaseKernel
         $this->rootDir = sys_get_temp_dir().'/sf2_'.rand(1, 9999);
         if (!is_dir($this->rootDir)) {
             if (false === @mkdir($this->rootDir)) {
-                die(sprintf('Unable to create a temporary directory (%s)', $this->rootDir));
+                exit(sprintf('Unable to create a temporary directory (%s)', $this->rootDir));
             }
         } elseif (!is_writable($this->rootDir)) {
-            die(sprintf('Unable to write in a temporary directory (%s)', $this->rootDir));
+            exit(sprintf('Unable to write in a temporary directory (%s)', $this->rootDir));
         }
 
         parent::__construct('env', true);

+ 2 - 2
src/Symfony/Component/HttpKernel/Kernel.php

@@ -520,10 +520,10 @@ abstract class Kernel implements KernelInterface
             $dir = $container->getParameter(sprintf('kernel.%s_dir', $name));
             if (!is_dir($dir)) {
                 if (false === @mkdir($dir, 0777, true)) {
-                    die(sprintf("Unable to create the %s directory (%s)\n", $name, dirname($dir)));
+                    exit(sprintf("Unable to create the %s directory (%s)\n", $name, dirname($dir)));
                 }
             } elseif (!is_writable($dir)) {
-                die(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));
+                exit(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));
             }
         }
 

+ 1 - 1
src/Symfony/Component/Locale/Resources/data/update-data.php

@@ -11,7 +11,7 @@
 
 function bailout($message)
 {
-    die($message."\n");
+    exit($message."\n");
 }
 
 function check_dir($source)