Skip to content

Minor error #1

@ekandreas

Description

@ekandreas

First! Thank you for a great plugin and I have been looking for this for a long time and considered to write my own. The code looks clean and verified.

Att row 558 in /blocks/block.widget.php a check for empty array is missing.
Warning: Invalid argument supplied for foreach() in /Users/andreas/Sites/layout/wp-content/plugins/layout-engine/blocks/block.widget.php on line 558

foreach($in_widgets as $w)
{
$available_widgets[] = $w;
}

should instead read:

if (sizeof($in_widgets)>0){
foreach($in_widgets as $w)
{
$available_widgets[] = $w;
}
}

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions