This commit is contained in:
hufangzhou
2022-04-18 09:19:34 +08:00
parent ae094b7350
commit 80ac96b791
+1 -1
View File
@@ -850,6 +850,6 @@ class apiModel extends model
private function getDemoData($table, $version)
{
$file = $this->app->getAppRoot() . 'db' . DS . 'api' . DS . $version . DS . $table;
return unserialize(file_get_contents($file));
return unserialize(preg_replace_callback('#s:(\d+):"(.*?)";#s', function($match){return 's:'.strlen($match[2]).':"'.$match[2].'";';}, file_get_contents($file)));
}
}