[+BUGFIX] Reverted a change led to a non-functional control flow. Thanks to Fatoux...
authorjocrau <jocrau@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 6 Oct 2010 15:10:20 +0000 (15:10 +0000)
committerBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 4 Dec 2014 23:56:08 +0000 (00:56 +0100)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/contagged/trunk@38898 735d13b6-9817-0410-8766-e36946ffe9aa

model/class.tx_contagged_model_terms.php

index e12d527..b6efa3e 100644 (file)
@@ -66,8 +66,10 @@ class tx_contagged_model_terms implements t3lib_Singleton {
                        foreach ($storagePidsArray as $pid) {
                                // if there is an entry for the data source: check for duplicates before adding the pid
                                // otherwise: create a new entry and add the pid
-                               if (is_array($this->dataSourceArray[$dataSource]) && !in_array(intval($pid),$this->dataSourceArray[$dataSource])) {
-                                       $this->dataSourceArray[$dataSource][] = intval($pid);
+                               if ($this->dataSourceArray[$dataSource]) {
+                                       if ( !in_array($pid,$dataSourceArray[$dataSource]) ) {
+                                               $this->dataSourceArray[$dataSource][] = intval($pid);
+                                       }
                                } else {
                                        $this->dataSourceArray[$dataSource][] = intval($pid);
                                }