Should I put it into bugzilla with the patch or is posting here (see below) sufficient?
Justin Lipton wrote:
Hi,
I just found a bug in the SimpleContentModel class - looks like it had been lurking for a while.
The bug rears it's head when attempting to check the allowable content for the following simple content scenario:
a, b
when only one child is passed in (eg x) the SimpleContentModel returns 1 (a valid state) regardless of whether not x is valid.
Here's a patch that should work:
@@ -297,7 +297,11 @@
}
}
else {
- if (length > 2) {
+ if (length == 1) {
+ if (children[offset].rawname != fFirstChild.rawname) {
+ return 0;
+ }
+ } else if (length > 2) {
return 2;
}
Cheers, Justin.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
