# [PATCH] Error message cleanup

- Thread: https://externals.io/message/25817
- Original archive: https://news-web.php.net/php.internals/25817
- Started by Matt W on 2006-09-25T12:48:54+00:00
- Messages: 5
- 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

---

## #25817 — Matt W — 2006-09-25T12:48:54+00:00

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

Hi,

Don't know if someone wants to check this out and apply it before 5.2's
release, or whether you want it at all. ;-)  I just noticed how many of the
php_error_docref()'s still have a period (".") at the end of the text,
resulting in "... error message. in <file> on line <line>"  Looks
better/consistent without a period, and I think that's how you want it now,
isn't it?

I don't know if my regex search found all occurrences, but I fixed up the
files I found.  The only changes were removing a trailing period (or a space
in a few places), and a couple typos I noticed in the ones I changed -- 
"interger", "can not" -> "cannot", I think that's about all.  Also updated
the necessary test files I found, to reflect the changes.  I think (hope)
everything's OK, but haven't tested it!

There looks to be 209/188 changes in 5.2/6, respectively.  BTW, 5.2's
ext/soap/tests/bugs/bug31755.phpt must be screwed up (new lines) since the
diff is deleting every line first...

http://realplain.com/php/error_messages.diff
http://realplain.com/php/error_messages_5_2.diff


Thanks,
Matt

---

## #25818 — Richard Quadling — 2006-09-25T13:25:43+00:00

URL: https://externals.io/message/25817#25818 · In reply to: #25817

> Hi,
>
> Don't know if someone wants to check this out and apply it before 5.2's
> release, or whether you want it at all. ;-)  I just noticed how many of the
> php_error_docref()'s still have a period (".") at the end of the text,
> resulting in "... error message. in <file> on line <line>"  Looks
> better/consistent without a period, and I think that's how you want it now,
> isn't it?
>
> I don't know if my regex search found all occurrences, but I fixed up the
> files I found.  The only changes were removing a trailing period (or a space
> in a few places), and a couple typos I noticed in the ones I changed --
> "interger", "can not" -> "cannot", I think that's about all.  Also updated
> the necessary test files I found, to reflect the changes.  I think (hope)
> everything's OK, but haven't tested it!
>
> There looks to be 209/188 changes in 5.2/6, respectively.  BTW, 5.2's
> ext/soap/tests/bugs/bug31755.phpt must be screwed up (new lines) since the
> diff is deleting every line first...
>
> http://realplain.com/php/error_messages.diff
> http://realplain.com/php/error_messages_5_2.diff
>
>
> Thanks,
> Matt

What's your regex? What files do you examine.

I've found some error messages ending in ! and some ending with \n.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&amp;r=213474731
"Standing on the shoulders of some very clever giants!"

---

## #25819 — Matt W — 2006-09-25T14:15:07+00:00

URL: https://externals.io/message/25817#25819 · In reply to: #25818

Hi Richard,

----- Original Message -----
From: "Richard Quadling"
Sent: Monday, September 25, 2006


> 
> > […]
the
> > […]
space
> > […]
updated
> > […]
(hope)
> > […]
>
> What's your regex? What files do you examine.
>
> I've found some error messages ending in ! and some ending with \n.

Using my editor's (NoteTab) Search in Files tool, I searched all files, but
then just *.c since only they had what I was looking for (AFAIK).  The regex
was php_error_docref\(.+\".+[. ]\" which does match incorrectly in some
places, but I just skip ahead. :-)  I looked at each one, so as to not do
something wrong trying to do a blind "Replace All."  (OT: I just now
realized that I don't think I need to escape the regex's double quotes...?
It works, but I must be too used to writing them only in quoted strings
(PHP...). ;-))

I know some of the messages end with "!" (some "?" also), but I figure they
should stay.  The only place I found a \n (\ and n in the file) is in 6's
main/streams/filter.c.  That's kinda weird, though it would just appear as a
space in the browser with HTML (e.g. should prob be changed too).

There was another typo I wasn't sure about in ext/fbsql/php_fbsql.c:
"FrontBase link is not connected, ty to reconnect" -- is it supposed to be
"trying" or what?


Matt

---

## #25944 — Matt W — 2006-10-05T08:32:29+00:00

URL: https://externals.io/message/25817#25944 · In reply to: #25817

Hi all,

So is there any interest in applying this "tidying up?"  Before 5.2's
official release?  Just to have all the error messages (that I found) more
consistent. ;-)


Thanks,
Matt

P.S.  Is this something that would be sent to the QA list...?  (For future
reference.)


----- Original Message -----
From: "Matt W"
Sent: Monday, September 25, 2006


> Hi,
>
> Don't know if someone wants to check this out and apply it before 5.2's
> release, or whether you want it at all. ;-)  I just noticed how many of
the
> php_error_docref()'s still have a period (".") at the end of the text,
> resulting in "... error message. in <file> on line <line>"  Looks
> better/consistent without a period, and I think that's how you want it
now,
> isn't it?
>
> I don't know if my regex search found all occurrences, but I fixed up the
> files I found.  The only changes were removing a trailing period (or a
space
> in a few places), and a couple typos I noticed in the ones I changed -- 
> "interger", "can not" -> "cannot", I think that's about all.  Also updated
> the necessary test files I found, to reflect the changes.  I think (hope)
> everything's OK, but haven't tested it!
>
> There looks to be 209/188 changes in 5.2/6, respectively.  BTW, 5.2's
> ext/soap/tests/bugs/bug31755.phpt must be screwed up (new lines) since the
> diff is deleting every line first...
>
> http://realplain.com/php/error_messages.diff
> http://realplain.com/php/error_messages_5_2.diff
>
>
> Thanks,
> Matt

---

## #25991 — Hannes Magnusson — 2006-10-08T13:37:17+00:00

URL: https://externals.io/message/25817#25991 · In reply to: #25817

> Hi,
>
> Don't know if someone wants to check this out and apply it before 5.2's
> release, or whether you want it at all. ;-)  I just noticed how many of the
> php_error_docref()'s still have a period (".") at the end of the text,
> resulting in "... error message. in <file> on line <line>"  Looks
> better/consistent without a period, and I think that's how you want it now,
> isn't it?
>
> I don't know if my regex search found all occurrences, but I fixed up the
> files I found.  The only changes were removing a trailing period (or a space
> in a few places), and a couple typos I noticed in the ones I changed --
> "interger", "can not" -> "cannot", I think that's about all.  Also updated
> the necessary test files I found, to reflect the changes.  I think (hope)
> everything's OK, but haven't tested it!
>
> There looks to be 209/188 changes in 5.2/6, respectively.  BTW, 5.2's
> ext/soap/tests/bugs/bug31755.phpt must be screwed up (new lines) since the
> diff is deleting every line first...
>
> http://realplain.com/php/error_messages.diff
> http://realplain.com/php/error_messages_5_2.diff
>

Thanks! Patch committed to HEAD. Doubt it'll make it into 5.2.0.

-Hannes
