Created
March 7, 2013 10:06
-
-
Save jfsimon/5106941 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fix previously broken serialized arrays content lengths | |
$content = preg_replace_callback( | |
'/s:(\d+):"(.*?)";/e', | |
function (array $matches) { | |
return sprintf('s:%s:"%s";', strlen($matches[1]), $matches[1]); | |
}, | |
$content | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment