convert param to array
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 1 Apr 2016 10:51:11 +0000 (12:51 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 1 Apr 2016 17:05:16 +0000 (19:05 +0200)
... as giving a string this was causing an error in
 Calendar_Setup_Update_Release8->update_11():
 Invalid argument supplied for foreach()
 in /usr/share/tine20/ActiveSync/Controller.php::84

Change-Id: Ie0f8861c83549f5c0929a6a5e7ec0e8042994f73
Reviewed-on: http://gerrit.tine20.com/customers/2987
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/ActiveSync/Controller.php

index 5bc7343..272586c 100644 (file)
@@ -56,11 +56,14 @@ class ActiveSync_Controller extends Tinebase_Controller_Abstract
      * reset sync for user
      *
      * @param mixed $user
-     * @param array $classesToReset
+     * @param array|string $classesToReset
      * @return boolean
      */
     public function resetSyncForUser($user, $classesToReset)
     {
+        if (is_string($classesToReset)) {
+            $classesToReset = array($classesToReset);
+        }
 
         if (! $user instanceof Tinebase_Model_User) {
             try {