[geeklog-cvs] geeklog: Fixed bug when null was returned from plugin_getwhatsne...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Mar 10 09:14:43 EST 2010


changeset 7776:7e8f25e5d425
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7e8f25e5d425
user: Tom <websitemaster at cogeco.net>
date: Wed Mar 10 08:57:23 2010 -0500
description:
Fixed bug when null was returned from plugin_getwhatsnewcomment functions

diffstat:

 system/lib-plugins.php |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r b62e11b8d65b -r 7e8f25e5d425 system/lib-plugins.php
--- a/system/lib-plugins.php	Tue Mar 09 19:07:03 2010 -0500
+++ b/system/lib-plugins.php	Wed Mar 10 08:57:23 2010 -0500
@@ -1958,7 +1958,10 @@
 
                 $fn_new = 'plugin_getwhatsnewcomment_' . $pi_name;
                 if (function_exists($fn_new)) {
-                    $whatsnew = array_merge($fn_new (), $whatsnew);
+                    $tempwhatsnew = $fn_new ();
+                    if(!empty($tempwhatsnew) && is_array($tempwhatsnew)) {
+                        $whatsnew = array_merge($tempwhatsnew, $whatsnew);
+                    }
                 }
             }
         }
@@ -1972,7 +1975,10 @@
 
             $fn_new = 'CUSTOM_getwhatsnewcomment';
             if (function_exists($fn_new)) {
-                $whatsnew = array_merge($fn_new (), $whatsnew);
+                $tempwhatsnew = $fn_new ();
+                if(!empty($tempwhatsnew) && is_array($tempwhatsnew)) {
+                    $whatsnew = array_merge($tempwhatsnew, $whatsnew);
+                }
             }
         }
     }



More information about the geeklog-cvs mailing list