diff --git a/web/includes/Event.php b/web/includes/Event.php index 3a504145c..857059efc 100644 --- a/web/includes/Event.php +++ b/web/includes/Event.php @@ -48,10 +48,16 @@ class Event { } public function __call( $fn, array $args){ + if ( count( $args ) ) { + $this->{$fn} = $args[0]; + } if ( array_key_exists( $fn, $this ) ) { return $this->{$fn}; -#array_unshift($args, $this); -#call_user_func_array( $this->{$fn}, $args); + + $backTrace = debug_backtrace(); + $file = $backTrace[1]['file']; + $line = $backTrace[1]['line']; + Warning( "Unknown function call Event->$fn from $file:$line" ); } } diff --git a/web/includes/Frame.php b/web/includes/Frame.php index b875ad113..7575aeed8 100644 --- a/web/includes/Frame.php +++ b/web/includes/Frame.php @@ -36,10 +36,16 @@ class Frame { return new Event( $this->{'EventId'} ); } public function __call( $fn, array $args){ - if( array_key_exists( $fn, $this ) ) { + if ( count( $args ) ) { + $this->{$fn} = $args[0]; + } + if ( array_key_exists( $fn, $this ) ) { return $this->{$fn}; -#array_unshift($args, $this); -#call_user_func_array( $this->{$fn}, $args); + + $backTrace = debug_backtrace(); + $file = $backTrace[1]['file']; + $line = $backTrace[1]['line']; + Warning( "Unknown function call Frame->$fn from $file:$line" ); } } diff --git a/web/includes/Storage.php b/web/includes/Storage.php index d03f089f0..84949e988 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -58,10 +58,16 @@ class Storage { } public function __call( $fn, array $args= NULL){ - if(isset($this->{$fn})){ + if ( count( $args ) ) { + $this->{$fn} = $args[0]; + } + if ( array_key_exists( $fn, $this ) ) { return $this->{$fn}; -#array_unshift($args, $this); -#call_user_func_array( $this->{$fn}, $args); + + $backTrace = debug_backtrace(); + $file = $backTrace[1]['file']; + $line = $backTrace[1]['line']; + Warning( "Unknown function call Storage->$fn from $file:$line" ); } } public static function find_all() { diff --git a/web/includes/database.php b/web/includes/database.php index d19bc86ac..76df214d8 100644 --- a/web/includes/database.php +++ b/web/includes/database.php @@ -127,10 +127,10 @@ function dbQuery( $sql, $params=NULL ) { } else { $result = $dbConn->query( $sql ); } - //if ( $params ) - //Warning("SQL: $sql" . implode(',',$params)); - //else - //Warning("SQL: $sql" ); + if ( $params ) + Warning("SQL: $sql" . implode(',',$params)); + else + Warning("SQL: $sql" ); } catch(PDOException $e) { Error( "SQL-ERR '".$e->getMessage()."', statement was '".$sql."' params:" . implode(',',$params) ); }