Index: trunk/kernel/include/customfield.php
===================================================================
diff -u -r104 -r288
--- trunk/kernel/include/customfield.php (.../customfield.php) (revision 104)
+++ trunk/kernel/include/customfield.php (.../customfield.php) (revision 288)
@@ -102,8 +102,7 @@
$DataTable = GetTablePrefix()."CustomMetaData";
$sql = "SELECT $table.*,$DataTable.Value as Value, $DataTable.CustomDataId as CustomDataId FROM ".$table." LEFT JOIN $DataTable ON ";
$sql .= "(".$table.".CustomFieldId=$DataTable.CustomFieldId AND $DataTable.ResourceId=$ResourceId) WHERE Type=".$this->Type;
- if((int)$_GLOBALS["debuglevel"])
- echo $sql."
\n";
+ if( isset($GLOBALS["debuglevel"]) && $GLOBALS["debuglevel"]) echo $sql."
\n";
$rs = $this->adodbConnection->Execute($sql);
while($rs && !$rs->EOF)
{