ThemeFuse / Unyson-Backups-Extension

Backup & Demo Content - This extension lets you create an automated backup schedule, import demo content or even create a demo content archive for migration purposes.
http://manual.unyson.io/en/latest/extension/backups/
10 stars 17 forks source link

PHP 8.1 sizes generate issue with array merge #71

Open AmentoTech opened 1 year ago

AmentoTech commented 1 year ago

Hello @ViorelEremia

I hope you are doing well

We are a theme developer and have been working with Unyson and its demo content importer for a couple of years. PHP 7.4 is deprecated on many servers. Our many customers, facing issues with demo content import. This is not a big issue but stopping our customers to import demo content. We just got fixed that by adding a line of code. If you could add that fix quickly that would be much appreciated

8 1

This is fix ext-8 1

Replace that line :

$state['processed_sizes'] = array_merge($state['processed_sizes'], $meta['sizes']);

with below

if(!empty($state['processed_sizes']) && !empty($meta['sizes'])){
    $state['processed_sizes'] = array_merge($state['processed_sizes'], $meta['sizes']);
}

Looking forward to fixing that asap, that would be much appreciated

Thank you