php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54539 quotemeta('') returns false
Submitted: 2011-04-15 14:26 UTC Modified: 2011-04-19 08:21 UTC
From: theitzamna at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
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: theitzamna at gmail dot com
New email:
PHP Version: OS:

 

 [2011-04-15 14:26 UTC] theitzamna at gmail dot com
Description:
------------
http://php.net/manual/en/function.quotemeta.php

This document states:

>>Return Values
>>Returns the string with meta characters quoted.

but if an empty string is passed to quotemeta() as an argument a boolean(false) 
is being returned.

Test script:
---------------
<?php
var_dump(quotemeta(""));
?>

Return result for php 5.2.6 and 5.3.5 (MacOS X, Windows, FreeBSD, Ubuntu):
>>bool(false)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-19 08:18 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Package: *General Issues +Package: Documentation problem -Assigned To: +Assigned To: aharvey
 [2011-04-19 08:18 UTC] aharvey@php.net
It's bizarre and inconsistent with pretty much every other escaping function, but looking at SVN, it's also been that way for eleven and a bit years. Rather than break backward compatibility, I'll add a note to the manual.
 [2011-04-19 08:21 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=310344
Log: Update the return value section of quotemeta() to fix doc bug #54539
(quotemeta('') returns false).
 [2011-04-19 08:21 UTC] aharvey@php.net
-Status: Assigned +Status: Closed -Type: Bug +Type: Documentation Problem
 [2011-04-19 08:21 UTC] aharvey@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Apr 04 22:01:29 2025 UTC