From 4496dda72c94915da2083ddb5ae7d2ecb967890e Mon Sep 17 00:00:00 2001 From: Pavel Date: Sun, 13 Dec 2015 14:42:45 +0500 Subject: [PATCH 1/2] + An isset check for the global $modx variable has been added to prevent an error when calling the getFullTableName method. --- modx.ddtools.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modx.ddtools.class.php b/modx.ddtools.class.php index a14b9ac..8f2902f 100644 --- a/modx.ddtools.class.php +++ b/modx.ddtools.class.php @@ -1307,9 +1307,11 @@ public static function generateRandomString($length = 8, $chars = 'abcdefghijklm } } -//Решение спорное, но делать Синглтон очень не хотелось -foreach (ddTools::$tables as $key => $val){ - ddTools::$tables[$key] = $modx->getFullTableName($key); +if(isset($modx)){ + //Решение спорное, но делать Синглтон очень не хотелось + foreach (ddTools::$tables as $key => $val){ + ddTools::$tables[$key] = $modx->getFullTableName($key); + } } if (method_exists($modx, 'getVersionData')){ From e918fc8a6b3b56d96f70d14c43a6cf4e0246ea5e Mon Sep 17 00:00:00 2001 From: Pavel Date: Sun, 13 Dec 2015 14:43:54 +0500 Subject: [PATCH 2/2] Prerelease 0.14.3 --- modx.ddtools.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modx.ddtools.class.php b/modx.ddtools.class.php index 8f2902f..a129ad2 100644 --- a/modx.ddtools.class.php +++ b/modx.ddtools.class.php @@ -1,11 +1,11 @@