瀏覽代碼

Merge pull request #2334 from Strubbl/patch-2

Update HashidService.php
daniel 5 年之前
父節點
當前提交
2e8ba94883
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Services/HashidService.php

+ 2 - 2
app/Services/HashidService.php

@@ -21,7 +21,7 @@ class HashidService {
 			$shortcode = '';
 			while($id) {
 				$id = ($id - ($r = $id % $base)) / $base;
-				$shortcode = $cmap{$r} . $shortcode;
+				$shortcode = $cmap[$r] . $shortcode;
 			};
 			return $shortcode;
 		});
@@ -47,4 +47,4 @@ class HashidService {
 		return $id;
 	}
 
-}
+}