Przeglądaj źródła

32-bit systems provide a string for BIGINT (#9486)

Fix #9485
darodi 1 dzień temu
rodzic
commit
f436b43c82
2 zmienionych plików z 11 dodań i 3 usunięć
  1. 5 1
      app/Models/Category.php
  2. 6 2
      app/Models/Feed.php

+ 5 - 1
app/Models/Category.php

@@ -73,7 +73,11 @@ class FreshRSS_Category extends Minz_Model {
 		return $this->error;
 	}
 
-	public function _error(bool|int $value): void {
+	/**
+	 * @param bool|int|numeric-string $value
+	 * 32-bit systems provide a string and will fail in year 2038
+	 */
+	public function _error(bool|int|string $value): void {
 		$this->error = (bool)$value;
 	}
 	public function isDefault(): bool {

+ 6 - 2
app/Models/Feed.php

@@ -564,8 +564,12 @@ class FreshRSS_Feed extends Minz_Model {
 		$this->httpAuth = $value;
 	}
 
-	public function _error(int $value): void {
-		$this->error = $value;
+	/**
+	 * @param int|numeric-string $value
+	 * 32-bit systems provide a string and will fail in year 2038
+	 */
+	public function _error(int|string $value): void {
+		$this->error = (int)$value;
 	}
 	public function _mute(bool $value): void {
 		$this->mute = $value;