Deprecated: Function get_magic_quotes_gpc() is deprecated in C:\xampp\htdocs\CAD\incs\functions.inc.php on line 3344

73 views
Skip to first unread message

mike

unread,
Nov 20, 2021, 9:28:10 AM11/20/21
to Open Source CAD
can that line of code be deleted/made to be ingnored or switched out to something that is not deprecated. 

mike

unread,
Nov 20, 2021, 9:29:36 AM11/20/21
to Open Source CAD
function quote_smart($value) { // 1/28/09
if (get_magic_quotes_gpc()) { // Stripslashes
$value = stripslashes($value);
}
if (!is_int($value)) { // Quote if not a number or a numeric string
$value = "'" . mysql_real_escape_string($value) . "'";
}
return $value;

Mark Taylor

unread,
Nov 20, 2021, 10:00:54 AM11/20/21
to open-so...@googlegroups.com
The code works fine for me using php 7.4.16

What version of php are you using?  If newer then perhaps you could roll back to an older version.



--
You received this message because you are subscribed to the Google Groups "Open Source CAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-source-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-source-cad/69f81d43-4a51-463b-bdb2-f5329dbff98dn%40googlegroups.com.

mike

unread,
Nov 20, 2021, 10:18:35 AM11/20/21
to Open Source CAD
7.4.22

Mark Taylor

unread,
Nov 20, 2021, 10:22:35 AM11/20/21
to open-so...@googlegroups.com
Mike, is it crashing, halting execution, locking up, or just filling up an error log?



Arnie Shore

unread,
Nov 20, 2021, 10:28:36 AM11/20/21
to Open Source CAD
That function has been bad news PHP-wise for some time, and has been officially deprecated in version 8.  But I wouldn't fall back to an earlier version. Sorry, but I'll need some time to look harder at its usage and come up with a replacement.

You might place an at-sign in front of it, which SHOULD suppress the notification, I think. Like ( @get_magic_quotes_gpc())

AS

--

mike

unread,
Nov 20, 2021, 11:25:54 AM11/20/21
to Open Source CAD
 Screenshot 2021-11-20 112352.png

Arnie Shore

unread,
Nov 20, 2021, 11:43:05 AM11/20/21
to Open Source CAD
If the @ error-suppression works, then you might apply it wherever its ugly head arises.  But pls come back either way about that..

AS

mike

unread,
Nov 20, 2021, 11:57:08 AM11/20/21
to Open Source CAD
it worked for that, thanks for the suggestion. 

Mark Taylor

unread,
Nov 20, 2021, 11:58:55 AM11/20/21
to open-so...@googlegroups.com
I recall somewhere you can also suppress errors to the screen.  That may be what I did, it’s been so long ago. 




mike

unread,
Nov 20, 2021, 12:48:17 PM11/20/21
to Open Source CAD
whould these errors make the map not show on the situation screen and new call screen

Arnie Shore

unread,
Nov 20, 2021, 12:57:17 PM11/20/21
to Open Source CAD
Mike, it's not impossible, but without a harder look I just can't say.  The point is that we just haven't tested Tix under PHP 8 so far.   Given these important errors  then falling back to PHP 7-something isn't the world's worst idea, if that is practical for you.

mike

unread,
Nov 20, 2021, 1:05:32 PM11/20/21
to Open Source CAD
I dont thing that im running 8.  it shows  7.4.22
Reply all
Reply to author
Forward
0 new messages