php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69608 fwrite and magic_quotes_runtime
Submitted: 2015-05-08 19:34 UTC Modified: 2017-09-12 10:38 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Not a bug Package: Filesystem function related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [2015-05-08 19:34 UTC] cmb@php.net
Description:
------------
---
From manual page: http://www.php.net/function.fwrite
---

The documentation states:

> Note that if the length argument is given, then the
> magic_quotes_runtime configuration option will be ignored and no
> slashes will be stripped from string.

However, when magic_quotes_runtime is On, writing would not
*strip*, but rather *add* slashes (backslashes might be the better
wording).


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-12 10:38 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2017-09-12 10:38 UTC] cmb@php.net
> However, when magic_quotes_runtime is On, writing would not
> *strip*, but rather *add* slashes […]

No, it does indeed strip, see <https://3v4l.org/KLqJ9>.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 00:01:36 2025 UTC