viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Tweak to macosx memory calculation, a=chris

Chris Pollett [2020-06-27 23:Jun:th]
Tweak to macosx memory calculation, a=chris
Filename
src/configs/Config.php
src/library/UpgradeFunctions.php
diff --git a/src/configs/Config.php b/src/configs/Config.php
index 6b287f0f3..5c2dad60d 100755
--- a/src/configs/Config.php
+++ b/src/configs/Config.php
@@ -692,7 +692,7 @@ function defineMemoryProfile()
             $memory = 1024 * intval($data[1]);
         }
     } else if (stristr(PHP_OS, "DARWIN")) {
-        exec('sysctl hw.memsize', $memory_array);
+        exec('/usr/sbin/sysctl hw.memsize', $memory_array);
         if (!empty($memory_array)) {
             preg_match("/\d+/", $memory_array[0], $mem_matches);
             $memory = $mem_matches[0];
diff --git a/src/library/UpgradeFunctions.php b/src/library/UpgradeFunctions.php
index 0de70f4db..ea463e0d9 100644
--- a/src/library/UpgradeFunctions.php
+++ b/src/library/UpgradeFunctions.php
@@ -124,10 +124,10 @@ function upgradePublicHelpWiki(&$db)
         foreach ($locale_pages as $page_name => $page_content) {
             $page_info = $group_model->getPageInfoByName(C\HELP_GROUP_ID,
                 $page_name, $locale_tag, "edit");
-            if ($page_content != $page_info['PAGE'] &&
+            if (empty($page_info) || ($page_content != $page_info['PAGE'] &&
                 (in_array($page_info['EDIT_COMMENT'], ['upgrade', 'create']) ||
                 empty($page_info['PUB_DATE']) ||
-                $page_info['PUB_DATE'] < 1555802108) ) {
+                $page_info['PUB_DATE'] < 1593297907)) ) {
                 $group_model->setPageName(C\ROOT_ID, C\HELP_GROUP_ID,
                     $page_name, $page_content, $locale_tag, "upgrade",
                     tl('social_component_page_created', $page_name),
ViewGit