php warning after wordpress plugin update 1.6.0 and 1.6.1
Submitted by gkovaleff on Mon, 04/11/2016 - 17:00
Hi,
After wp h5p plugin udpate (1.6.0 and 1.6.1) php warning occured:
"Warning: Invalid argument supplied for foreach() in my-site-dir/wp-content/plugins/h5p/public/class-h5p-plugin.php on line 859"
WP - 4.4.2
PHP - 5.4.45, memory limit -256 mb
Possible to fix by adding array() into foreach() in line 859: foreach ((array)$assets['styles'] as $style) {
Best regards!
icc
Tue, 04/12/2016 - 11:40
Permalink
Thank you for pointing this
Thank you for pointing this out! To avoid notices elsewhere I've made sure the function always returns the two arrays: 7474916. This fix will be part of the next plugin release.