From 95900abeff8d853c0449c37eafa8457a884ce6bb Mon Sep 17 00:00:00 2001 From: osmiy Date: Wed, 15 Nov 2006 15:13:50 +0000 Subject: - improved error displaying and more git-svn-id: svn://svn.zabbix.com/trunk@3489 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/copt.lib.php | 41 +++++++++++++------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'frontends/php/include/copt.lib.php') diff --git a/frontends/php/include/copt.lib.php b/frontends/php/include/copt.lib.php index 8ab70aae..ec1cb294 100644 --- a/frontends/php/include/copt.lib.php +++ b/frontends/php/include/copt.lib.php @@ -331,34 +331,21 @@ else } else { - if(version_compare(phpversion(),'5.0','<')) - { - eval(' - class COpt - { - /* public static */ function profiling_start($type=NULL) {} - /* public static */ function profiling_stop($type=NULL) {} - /* public static */ function savesqlrequest($sql) {} - /* public static */ function showmemoryusage($descr=null) {} - /* public static */ function compare_files_with_menu($menu=null) {} - /* public static */ function counter_up($type=NULL) {} - }' - ); - } - else + $static = null; + if(version_compare(phpversion(),'5.0','>=')) + $static = 'static'; + + eval(' + class COpt { - eval(' - class COpt - { - static function profiling_start($type=NULL) {} - static function profiling_stop($type=NULL) {} - static function savesqlrequest($sql) {} - static function showmemoryusage($descr=null) {} - static function compare_files_with_menu($menu=null) {} - static function counter_up($type=NULL) {} - }' - ); - } + '.$static.' function profiling_start($type=NULL) {} + '.$static.' function profiling_stop($type=NULL) {} + '.$static.' function savesqlrequest($sql) {} + '.$static.' function showmemoryusage($descr=null) {} + '.$static.' function compare_files_with_menu($menu=null) {} + '.$static.' function counter_up($type=NULL) {} + }' + ); } ?> -- cgit