[Laszlo-checkins] r3774 - openlaszlo/branches/legals/WEB-INF/lps/lfc/core

pbr@openlaszlo.org pbr at openlaszlo.org
Fri Feb 9 15:54:12 PST 2007


Author: pbr
Date: 2007-02-09 15:54:11 -0800 (Fri, 09 Feb 2007)
New Revision: 3774

Modified:
   openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
Log:
Change 20070209-Philip-0 by Philip at Philip-DC on 2007-02-09 17:32:38 EST
   in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals

Summary: Prevent referencing undefined variables.

New Features:

Bugs Fixed:

Technical Reviewer: jcrowley
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
I found 2 places in the code that can reference undefined variables when $debug
is set. This made it difficult in dhtml to track down the actual cause of the pr
oblem.

Tests:
inspection. The checks I added are run outside the $debug block but not used ins
ide it.

Files:
M      WEB-INF/lps/lfc/core/LzNode.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070209-Philip-0.tar


Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs	2007-02-09 23:19:25 UTC (rev 3773)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs	2007-02-09 23:54:11 UTC (rev 3774)
@@ -1343,7 +1343,7 @@
 function setName ( name ){
     if ((typeof(name) == 'string') && name.length) {
         if ($debug) {
-            if (this.parent[name] && this.parent[name] !== this) {
+            if (this.parent && this.parent[name] && this.parent[name] !== this) {
                 Debug.warn('Redefining %w.%s from %w to %w', 
                            this.parent, name, this.parent[name], this);
             }
@@ -1353,7 +1353,7 @@
         //than checking to see if parent == immediateparent
         //this supports name tunneling.
         if ($debug) {
-            if (this.immediateparent[name] && this.immediateparent[name] !== this) {
+            if (this.immediateparent && this.immediateparent[name] && this.immediateparent[name] !== this) {
                 Debug.warn('Redefining %w.%s from %w to %w', 
                            this.immediateparent, name, this.immediateparent[name], this);
             }



More information about the Laszlo-checkins mailing list