PHP warning

Invalid argument supplied for foreach()

/var/www/limesurvey/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php(1898)

1886      * Namespace.Directive => Value
1887      * @param $config_array Configuration associative array
1888      */
1889     public function loadArray($config_array) {
1890         if ($this->isFinalized('Cannot load directives after finalization')) return;
1891         foreach ($config_array as $key => $value) {
1892             $key = str_replace('_', '.', $key);
1893             if (strpos($key, '.') !== false) {
1894                 $this->set($key, $value);
1895             } else {
1896                 $namespace = $key;
1897                 $namespace_values = $value;
1898                 foreach ($namespace_values as $directive => $value) {
1899                     $this->set($namespace .'.'. $directive, $value);
1900                 }
1901             }
1902         }
1903     }
1904 
1905     /**
1906      * Returns a list of array(namespace, directive) for all directives
1907      * that are allowed in a web-form context as per an allowed
1908      * namespaces/directives list.
1909      * @param $allowed List of allowed namespaces/directives
1910      */

Stack Trace

#5
+
 /var/www/limesurvey/application/core/LSYii_Validators.php(105): CComponent->__set("options", array("AutoFormat.RemoveEmpty" => false, "CSS.AllowTricky" => true, "HTML.SafeObject" => true, "Output.FlashCompat" => true, ...))
100     * @param string $value
101     */
102     public function xssFilter($value)
103     {
104         $filter = new CHtmlPurifier();
105         $filter->options = array(
106             'AutoFormat.RemoveEmpty'=>false,
107             'CSS.AllowTricky'=>true, // Allow display:none; (and other)
108             'HTML.SafeObject'=>true, // To allow including youtube
109             'Output.FlashCompat'=>true,
110             'Attr.EnableID'=>true, // Allow to set id
#6
+
 /var/www/limesurvey/application/core/LSYii_Validators.php(52): LSYii_Validators->xssFilter("Jean MOULIN")
47 
48     protected function validateAttribute($object,$attribute)
49     {
50         if($this->xssfilter)
51         {
52             $object->$attribute=$this->xssFilter($object->$attribute);
53         }
54         if($this->isUrl)
55         {
56             if ($object->$attribute== 'http://' || $object->$attribute=='https://') {$object->$attribute="";}
57             $object->$attribute=html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8"); // 140219 : Why not urlencode ?
#10
+
 /var/www/limesurvey/application/models/Survey.php(381): CActiveRecord->save()
376         while (!is_null($isresult));
377 
378         $survey = new self;
379         foreach ($aData as $k => $v)
380             $survey->$k = $v;
381         $sResult= $survey->save();
382         if ($sResult==false) return false;
383         else return $aData['sid'];
384     }
385 
386     /**
2014-05-02 13:52:14 Apache/2.2.22 (Ubuntu) Yii Framework/1.1.14