瀏覽代碼

Update FromCommentsController.class.php

This pattern `$p = '/\/\*\*([\s\S])*?\*\//' ;` sometimes fails with error code: PREG_JIT_STACKLIMIT_ERROR,  so change the pattern to `$p = "|/\*\*([\s\S]*)\*/|U";` to fix it.
Liming-Wang 7 年之前
父節點
當前提交
59daece7d1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/Application/Api/Controller/FromCommentsController.class.php

+ 1 - 1
server/Application/Api/Controller/FromCommentsController.class.php

@@ -20,7 +20,7 @@ class FromCommentsController extends BaseController {
             return false;
         }
 
-        $p = '/\/\*\*([\s\S])*?\*\//' ;
+        $p = "|/\*\*([\s\S]*)\*/|U";
         preg_match_all($p, $content , $matches) ;
         if ($matches && $matches[0]) {
             foreach ($matches[0] as $key => $value) {