﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5443	Infinite loop possible in wfSajaxSearchCategoryChildrenFCKeditor()	peter_venkman		"details at the mwusers forum: http://www.mwusers.com/forums/showthread.php?14529-FCKeditor-extension-broken-category-links&p=48246

If you have a category that belongs to itself, there is an infinite loop that occurs in wfSajaxSearchCategoryChildrenFCKeditor().  Add the line ""if ($m_root == $row->title) continue;"" to the while loop after the database call is returned to avoid endless recursion:

	while ( ( $row = $dbr->fetchObject( $res ) ) ) {
		if ($m_root == $row->title) continue;
		$ret .= $row->title . ""\n"";
		$sub = explode( ""\n"", wfSajaxSearchCategoryChildrenFCKeditor( $row->title ) );
		foreach( $sub as $subrow )
			if( strlen( $subrow ) > 0 )
				$ret.= ' ' . $subrow . ""\n"";
	}"	Bug	closed	Normal		Project : MediaWiki+FCKeditor		invalid		
