浏览代码

Fix : api warning php 8.1

hystepik 2 年之前
父节点
当前提交
9d566c41df
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php

+ 2 - 2
htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php

@@ -403,8 +403,8 @@ class CommentParser
 		$code = 500;
 		$exception = 'Exception';
 		if (count($value) > 1) {
-			$v1 = $value[0];
-			$v2 = $value[1];
+			$v1 = empty($value[0]) ? null : $value[0];
+			$v2 = empty($value[1]) ? null : $value[1];
 			if (is_numeric($v1)) {
 				$code = $v1;
 				$exception = $v2;