Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated disableMagicQuotes method #3021

merged 1 commit into from Jan 22, 2020


Copy link

jessedobbelaere commented Jan 20, 2020


  • Enhancement

Resolves the following issues

Pull request description

I'm on a PHP 7.4 setup and my error tracker is filled with deprecation warning alerts on:

ErrorException: Deprecated: Function get_magic_quotes_gpc() is deprecated
#7 /spoon/filter/filter.php(146): SpoonFilter::disableMagicQuotes
#6 /src/Frontend/Init.php(19): Frontend\Init::initialize
#5 /app/ForkController.php(139): ForkCMS\App\ForkController::initializeFrontend
#4 /app/ForkController.php(77): ForkCMS\App\ForkController::frontendController
#3 /vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(151): Symfony\Component\HttpKernel\HttpKernel::handleRaw
#2 /vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel::handle
#1 /app/Kernel.php(53): ForkCMS\App\Kernel::handle
#0 /index.php(68): null

We seem to execute a Spoon Library function from the frontend and backend Init action:

The Spoon Library method starts by checking if(get_magic_quotes_gpc()) which triggers the deprecation warnings.

This get_magic_quotes_gpc is deprecated in PHP 7.4 and will soon start throwing errors in the next versions. According to the PHP docs, this always returns FALSE as of PHP 5.4.0 which we don't support for a long time already. So this code was never really executed anymore in the setups of PHP 5.6, PHP 7.0, 7.1, 7.2, 7.3, 7.4, ... 🤷‍♂️

Another Spoon method less in Fork

This is deprecated in PHP 7.4 and will soon start throwing errors. Was not executed since PHP 5.4.0 anyways.
@carakas carakas added this to the 5.7.2 milestone Jan 20, 2020
@carakas carakas merged commit b304d7a into forkcms:master Jan 22, 2020
4 checks passed
4 checks passed
Scrutinizer Analysis: No new issues – Tests: passed
TypoCheck No typos found
continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed
@carakas carakas modified the milestones: 5.7.2, 5.8.0 Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.