Skip to content

Commit 1f52afd

Browse files
jasonvargaclaude
andcommitted
Fix nocache database driver failing on MySQL with invalid UTF-8
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 08944b1 commit 1f52afd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/StaticCaching/NoCache/DatabaseSession.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function region(string $key): Region
3030
throw new RegionNotFound($key);
3131
}
3232

33-
return unserialize($region->region, ['allowed_classes' => true]);
33+
return unserialize(base64_decode($region->region), ['allowed_classes' => true]);
3434
}
3535

3636
protected function cacheRegion(Region $region)
@@ -39,7 +39,7 @@ protected function cacheRegion(Region $region)
3939
'key' => $region->key(),
4040
], [
4141
'url' => md5($this->url),
42-
'region' => serialize($region),
42+
'region' => base64_encode(serialize($region)),
4343
]);
4444
}
4545
}

0 commit comments

Comments
 (0)