dachcom-digital / pimcore-seo

The last SEO Bundle for Pimcore you'll ever need!
Other
36 stars 14 forks source link

Use isset check instead of !== null in ArrayHelper #33

Closed bitfactory-edo-freriks closed 1 year ago

bitfactory-edo-freriks commented 2 years ago

Saving og:image tag fails otherwise

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #32

The isset() check will not throw an exception when the 'value' key is not set, it also checks for null so in my opinion this check would be a better alternative.

Before the change this array would not properly save an og:image tag, after my change it saves correctly and issue #32 is solved :)

[
  'property' => 'og:image',
  'value' => [
    'id' => $header->getId(),
    'path' => $header->getCurrentFullPath(),
    'type' => 'asset',
    'subtype' => 'image',
  ],
];
bitfactory-edo-freriks commented 1 year ago

@solverat is this package dead?

solverat commented 1 year ago

Hey @bitfactory-edo-freriks thanks for efforts. Unfortunately, this issue is a quite nasty one (wondering why we never stumbled on that). I'm going to close this one in favor of #39.