Skip to content

Commit

Permalink
fix replacement in serialized objects
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillbolliger committed Oct 5, 2022
1 parent a448479 commit 5a87dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ public static function try_replace( $row, $field, $from_string, $to_string) {
else if(is_object($row[$field]) || $row[$field] instanceof __PHP_Incomplete_Class) { // Étrange fonctionnement avec Google Sitemap...
$array_object = (array) $row[$field];
$array_object = self::replace_recursive($array_object, $from_string, $to_string);
foreach($array_object as $key => $field) {
$row[$field]->$key = $field;
foreach($array_object as $key => $inner_field) {
$row[$field]->$key = $inner_field;
}
}
else {
Expand Down

0 comments on commit 5a87dc4

Please sign in to comment.