# get_magic_quotes_gpc() throws deprecated warning in 5.4

- Thread: https://externals.io/message/56300
- Original archive: https://news-web.php.net/php.internals/56300
- Started by david.zuelke@bitextender.com on 2011-11-12T11:06:00+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #56300 — david.zuelke@bitextender.com — 2011-11-12T11:06:00+00:00

URL: https://externals.io/message/56300#56300

I looked through the mailing list archives, and in several threads the consensus seemed to be that the setters should throw a warning, but the getters should not...

> localhost:test dzuelke$ ~/Code/oss/php/php-5.4.0RC1/sapi/cli/php -v
> PHP 5.4.0RC1 (cli) (built: Nov 11 2011 19:53:40) 
> Copyright (c) 1997-2011 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies
> localhost:test dzuelke$ ~/Code/oss/php/php-5.4.0RC1/sapi/cli/php -r 'get_magic_quotes_gpc();'
> PHP Deprecated:  Function get_magic_quotes_gpc() is deprecated in Command line code on line 1

Bug report is up at https://bugs.php.net/bug.php?id=55371, I've attached a patch to the ticket and this email that fixes the problem, test included.

- David

---

## #56301 — david.zuelke@bitextender.com — 2011-11-12T11:21:37+00:00

URL: https://externals.io/message/56300#56301 · In reply to: #56300

Had a few other tests failing, updated those accordingly and attached a newer version.

David




> I looked through the mailing list archives, and in several threads the consensus seemed to be that the setters should throw a warning, but the getters should not...
> 
> > […]
> 
> Bug report is up at https://bugs.php.net/bug.php?id=55371, I've attached a patch to the ticket and this email that fixes the problem, test included.
> 
> - David

---

## #56330 — Pierrick Charron — 2011-11-15T13:23:06+00:00

URL: https://externals.io/message/56300#56330

I also worked on the patch and I agree this is just an error :) I can
do the change if you want.

Pierrick


> 
> > […]
>
> According to the RFC it should not throw an error, so I think your patch is fine.
> If Pierre, who implemented it, doesnt have an objection I'll commit your patch tomorrow.
>
> - David

---

## #56331 — Pierre Joye — 2011-11-15T13:24:18+00:00

URL: https://externals.io/message/56300#56331 · In reply to: #56330

go ahead!


> I also worked on the patch and I agree this is just an error :) I can
> do the change if you want.
>
> Pierrick
>
> 
> > […]
>
> --
> 
> 
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
