# [PATCH] Proposal for fixing bug #40501

- Thread: https://externals.io/message/32526
- Original archive: https://news-web.php.net/php.internals/32526
- Started by David Soria Parra on 2007-10-01T21:36:19+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

---

## #32526 — David Soria Parra — 2007-10-01T21:36:19+00:00

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

Hi internals,

once again a proposal for a bugfix. 
This time concerning http://bugs.php.net/bug.php?id=40501.

As the standard escape character is \\ , but the RFC says ", I added a
optional escape character to the function call as a last parameter.
Furthermore, when the escape character is the same as the enclosure
character (e.g. "), a "" string will be escape, while a single " will be
enclosured.

the patch and the according updated and added testfiles can be found at

http://experimentalworks.net/downloads/bug40501.patch.tar.gz

opinions?

greets
 David

---

## #32528 — David Soria Parra — 2007-10-01T23:21:01+00:00

URL: https://externals.io/message/32526#32528 · In reply to: #32526

i forgot to mention. its against PHP_5_3 and also contains the necessary
adjustments in ext/spl/spl_directory.c

---

## #32536 — Marcus Boerger — 2007-10-02T09:26:24+00:00

URL: https://externals.io/message/32526#32536 · In reply to: #32526

Hello David,

Monday, October 1, 2007, 11:36:19 PM, you wrote:

> Hi internals,

> once again a proposal for a bugfix. 
> This time concerning http://bugs.php.net/bug.php?id=40501.

> As the standard escape character is \\ , but the RFC says ", I added a
> optional escape character to the function call as a last parameter.
> Furthermore, when the escape character is the same as the enclosure
> character (e.g. "), a "" string will be escape, while a single " will be
> enclosured.

> the patch and the according updated and added testfiles can be found at

> http://experimentalworks.net/downloads/bug40501.patch.tar.gz

> opinions?

> greets
>  David


Looks fine to me. And thanks for remembering to change SPL as well.
While I looked at your patch I noticed that white space in your patch was
not correct but in fact it looks like white space in all of SPL seems
broken. So we should either fix WS before or after that patch.

Best regards,
 Marcus

---

## #32539 — Jani Taskinen — 2007-10-02T11:06:39+00:00

URL: https://externals.io/message/32526#32539 · In reply to: #32536

I recommend AFTER. I myself tend to fix ws automatically..and then later
trying to commit ws/cs fixes separately is PITA.

So first fix the real problem then fix any ws/cs. :)

--Jani


> Hello David,
> 
> Monday, October 1, 2007, 11:36:19 PM, you wrote:
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> 
> Looks fine to me. And thanks for remembering to change SPL as well.
> While I looked at your patch I noticed that white space in your patch was
> not correct but in fact it looks like white space in all of SPL seems
> broken. So we should either fix WS before or after that patch.
> 
> Best regards,
>  Marcus
> 
-- 
Patches/Donations: http://pecl.php.net/~jani/
