Fixes CRM-19308: Disallow false-y values for paths purged during cache clears.
authorChristopher Gervais <chris@ergonlogic.com>
Sat, 3 Sep 2016 19:41:47 +0000 (15:41 -0400)
committerChristopher Gervais <chris@ergonlogic.com>
Sat, 3 Sep 2016 19:41:47 +0000 (15:41 -0400)
CRM/Utils/File.php

index 485280bd74388dff1f7e43e6945ee069cb96606b..d7fa4dd3a68de05e13e6f7593dee7f252b8624ed 100644 (file)
@@ -140,7 +140,7 @@ class CRM_Utils_File {
    */
   public static function cleanDir($target, $rmdir = TRUE, $verbose = TRUE) {
     static $exceptions = array('.', '..');
-    if ($target == '' || $target == '/') {
+    if ($target == '' || $target == '/' || !$target) {
       throw new Exception("Overly broad deletion");
     }