Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor error #1

Open
ekandreas opened this issue Oct 23, 2012 · 0 comments
Open

Minor error #1

ekandreas opened this issue Oct 23, 2012 · 0 comments

Comments

@ekandreas
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant