Skip to content

Commit

Permalink
Merge pull request #18 from asanger/patch-2
Browse files Browse the repository at this point in the history
Fixes one more issue with slashes in the serialized data
  • Loading branch information
tamagokun committed Oct 9, 2013
2 parents c3373e3 + 05bce16 commit 9070d37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
if(isset($app['merge_url'])) $app->old_url = $app['merge_url'];
info("premerge","replace {$app->old_url} with {$app->env->url}");
$sql = preg_replace("|http://{$app->old_url}|", "http://{$app->env->url}", $sql);
$sql = preg_replace_callback('|s:(\d+):\\\?"(.*?)\\\?";|', function($matches) { return "s:" . strlen($matches[2]) . ":\"" . $matches[2] . "\";"; }, $sql);
$sql = preg_replace_callback('|s:(\d+):\\\?"(.*?)\\\?";|', function($matches) { return "s:" . strlen(stripslashes($matches[2])) . ":\"" . $matches[2] . "\";"; }, $sql);
}
$sql = $sql."\nUPDATE {$app->env->wordpress["db_prefix"]}options SET option_value=\"http://{$app->env->url}\" WHERE option_name=\"siteurl\" OR option_name=\"home\";\n";

Expand Down

0 comments on commit 9070d37

Please sign in to comment.