projects
/
WP-Plugins
/
glm-member-db-packaging.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
467065d
)
Bug fix: fixing php error from foreach not having an array
author
Steve Sutton
<steve@gaslightmedia.com>
Fri, 24 Jun 2016 16:11:33 +0000
(12:11 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Fri, 24 Jun 2016 16:11:33 +0000
(12:11 -0400)
Checking the $packages first to see if it is an array.
setup/shortcodeBuilder.php
patch
|
blob
|
history
diff --git
a/setup/shortcodeBuilder.php
b/setup/shortcodeBuilder.php
index
44d14ae
..
8fa97d9
100644
(file)
--- a/
setup/shortcodeBuilder.php
+++ b/
setup/shortcodeBuilder.php
@@
-18,8
+18,10
@@
$package = new GlmDataPackages($this->wpdb, $this->config);
$packageList = $package->getList();
- foreach($packageList as $key=>$value){
- $packageListId[] = $value['id'];
+ if ( isset( $packageList ) && is_array( $packageList ) ) {
+ foreach($packageList as $key=>$value){
+ $packageListId[] = $value['id'];
+ }
}
// loop through packaging list shortcode attributes