Opened 12 years ago

Closed 12 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

Change History (2)

comment:1 Changed 12 years ago by Frederico Caldeira Knabben

Keywords: Pending added

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?

comment:2 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Resolution: worksforme
Status: newclosed

expired

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy