Opened 18 years ago
Closed 18 years ago
#134 closed Bug (worksforme)
Problem in fckeditor_php5.php
Reported by: | Frederico Caldeira Knabben | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Server : PHP | Version: | FCKeditor 2.4 |
Keywords: | SF Pending | Cc: | vogelor@… |
Description
While using fckeditor_php5.php i got the error message invalid value using foreach (or likely, i don't remember 100% the words).
After changing the ++ lines it works fine!
function GetConfigFieldString() { $sParams = '' ; $bFirst = true ; ++ if (is_array($this->Config)) ++ { foreach ( $this->Config as $sKey => $sValue ) { if ( $bFirst == false ) $sParams .= '&' ; else $bFirst = false ; if ( $sValue === true ) $sParams .= $this->EncodeConfig( $sKey ) . '=true' ; else if ( $sValue === false ) $sParams .= $this->EncodeConfig( $sKey ) . '=false' ; else $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; } ++ } return $sParams ; }
Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1666102&group_id=75348&atid=543653
The $this->Config is initialized as an Array in the object constructor. So if things are ok, it will certainly be an array, unless your application breaks it.
So, it seams that your application is actually buggy, not the editor. Can you provide us the code you are using to create the editor instance?