Get_magic_quotes_gpc is Deprecated - Kvcodes
X

Congrats, You are Subscribed to Receive Updates.

Get_magic_quotes_gpc is Deprecated


Introduction

The PHP version 7.4 is completely deprecated the get_magic_quotes_gpc() function. Earlier the magic_quotes_gpc from version 5.4 and we got alternative with get_magic_quotes_gpc(). And now it was completely deprecated and go without these functions. So those who faced bug or error with these functions.

Solution

It returns TRUE or FALSE. So most of them we used this function inside a if condition. like the below one.

if(get_magic_quotes_gpc()){
 // You Code
}

And some programmers might used it  like this.

$result = (get_magic_quotes_gpc() ? /* True Code */ : /* False Code */ );

But more over the solution is simply easy. Just remove that from this if condition either inline or full if condition. The PHP 7.4 itself that will take care of it. And no more needed to keep this code.

Conclusion

Remove the code and start programming without this condition. PHP 7.4 onwards you dont need to care about it.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, OpenCart Theme Development, PHP, HTML, CSS, jQuery, Bootstrap development and content SEO.

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar

Subscribe E-mail Updates

Congrats, You are Subscribed to Receive Updates.

Advertisement

Category Posts