#4226 closed defect (bug) (fixed)
missing regex delimiter
Reported by: | Mittineague | Owned by: | rob1n |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 2.1.3 |
Component: | General | Keywords: | wp-mail, regex |
Focuses: | Cc: |
Description (last modified by )
E_WARNING
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Delimiter
must not be alphanumeric or backslash at
/path/to/wordpress/wp-mail.php (59)
timed at 04-May-2007 19:23:34
// Set the author using the email address (To or Reply-To, the last used) // otherwise use the site admin if (preg_match('/From: /', $line) | preg_match('Reply-To: /', $line)) { $author=trim($line);
Should be .... '/Reply ....
Change History (8)
#2
@
17 years ago
- Description modified (diff)
- Milestone changed from 2.4 to 2.3
- Owner changed from anonymous to rob1n
- Status changed from new to assigned
No problem.
#3
@
17 years ago
- Milestone 2.3 deleted
- Resolution set to invalid
- Status changed from assigned to closed
I can't find such lines in 2.0, 2.1, 2.2 or trunk (2.3). Either it's a plugin (unlikely, since it's in a core file) or you're running a very old version. In which case my only fix is to upgrade ;).
#4
@
17 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Perhaps the reformatting (newlines were removed) of the code lines misled. I have the same lines in the wp-mail.php file in WordPress versions 2.0.7, 2.1, 2.1.1, 2.1.2, and (I think it's the most recent version) 2.1.3
The code should look like more this (extra newlines added)
Set the author using the email address (To or Reply-To, the last used)
otherwise use the site admin
if (preg_match('/From: /', $line) | preg_match('Reply-To: /', $line)) {
$author=trim($line);
Oops, please remove my domain path stuff and this comment, Thanks