瀏覽代碼

[PHP-FPM] Patch legacy template lib of NC if exists

andryyy 6 年之前
父節點
當前提交
61cd2c0353
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      data/Dockerfiles/phpfpm/docker-entrypoint.sh

+ 5 - 1
data/Dockerfiles/phpfpm/docker-entrypoint.sh

@@ -1,5 +1,4 @@
 #!/bin/bash
 #!/bin/bash
-set -e
 
 
 function array_by_comma { local IFS=","; echo "$*"; }
 function array_by_comma { local IFS=","; echo "$*"; }
 
 
@@ -92,4 +91,9 @@ EOF
   fi
   fi
 fi
 fi
 
 
+# Patching NC files, if any (fixes PHP 7.2.14 + NC 15.0.2)
+find /web/ -ipath '*lib/private/legacy/template.php' | while read -r template; do
+  sed -i "s/\$app \!== ''/\$app \!== '' \&\& \$app \!== 'core'/g" "${template}"
+done
+
 exec "$@"
 exec "$@"