소스 검색

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) {