preinheimer / xhprof

XHGUI is a GUI for the XHProf PHP extension, using a database backend, and pretty graphs to make it easy to use and interpret.
Other
833 stars 185 forks source link

Some observations running on php 7.4.4 #121

Closed flip111 closed 2 years ago

flip111 commented 4 years ago

Deprecated: Function get_magic_quotes_gpc() is deprecated in xhprof/xhprof_lib/utils/xhprof_lib.php on line 689

callgraph can not be displayed -- browser says it gives an error. no error found in xh_dot.err

I don't advise anyone to use this package in it's current state for php 7.4.4

aik099 commented 4 years ago

PRs with a fixes are welcome.

kamilwalas commented 2 years ago
--- a/xhprof_lib/utils/xhprof_lib.php
+++ b/xhprof_lib/utils/xhprof_lib.php
@@ -686,7 +686,7 @@ function xhprof_get_string_param($param, $default = '') {
   if ($val === null)
     return $default;

-  if (get_magic_quotes_gpc() == 1) {
+  if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1) {
     return stripslashes($val);
   }
aik099 commented 2 years ago

Fixed now. Thanks @kamilwalas and @flip111 .