1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix unserialize dictionary generation

We now have namespaced classes in here, and need to escape the
backslashes.
This commit is contained in:
Nikita Popov
2022-07-30 17:14:22 +02:00
parent 98b858e756
commit 828c93bedc

View File

@@ -3,7 +3,7 @@
$dict = "";
foreach (get_declared_classes() as $class) {
$len = strlen($class);
$dict .= "\"$len:\\\"$class\\\"\"\n";
$dict .= "\"$len:\\\"" . addslashes($class) . "\\\"\"\n";
}
file_put_contents(__DIR__ . "/dict/unserialize", $dict);