Skip to content
Snippets Groups Projects
Commit 75e0c165 authored by Miha Wagner's avatar Miha Wagner
Browse files

Revert "Issue #3345563 by Adil_Siddiqui: Deprecated function: unserialize(): Passing..."

This reverts commit 9c862ba9.
parent 9c862ba9
Branches 1.0.x
Tags 1.0.1
No related merge requests found
......@@ -21,7 +21,7 @@ class ProductHasData extends FieldPluginBase {
* {@inheritDoc}
*/
public function render(ResultRow $values) {
$data = !empty($this->getValue($values)) ? unserialize($this->getValue($values), ['allowed_classes' => FALSE]) : [];
$data = unserialize($this->getValue($values), ['allowed_classes' => FALSE]);
if ($data === NULL || $data === FALSE) {
return [
'#markup' => '<span class="color-warning">' . $this->t('No') . '</span>',
......
......@@ -163,7 +163,7 @@ class ProductStore extends DatabaseStorage {
)->fetchAllAssoc('name');
foreach ($asins as $asin) {
if (isset($result[$asin])) {
$values[$asin] = $this->serializer->decode((string) $result[$asin]->overrides);
$values[$asin] = $this->serializer->decode($result[$asin]->overrides);
}
}
}
......@@ -189,8 +189,8 @@ class ProductStore extends DatabaseStorage {
)->fetchAllAssoc('name');
foreach ($keys as $key) {
if (isset($result[$key])) {
$values[$key] = $this->serializer->decode((string) $result[$key]->value);
if ($overrides = $this->serializer->decode((string) $result[$key]->overrides)) {
$values[$key] = $this->serializer->decode($result[$key]->value);
if ($overrides = $this->serializer->decode($result[$key]->overrides)) {
$values[$key]['overrides'] = $overrides;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment