Opened 18 years ago
Closed 18 years ago
#3367 closed enhancement (fixed)
Single quote around double quote mysql string breaks on OpenVMS HP-PHP
Reported by: | WillemGrooters | Owned by: | |
---|---|---|---|
Milestone: | 2.0.6 | Priority: | normal |
Severity: | normal | Version: | 2.0.5 |
Component: | Optimization | Keywords: | has-patch |
Focuses: | Cc: |
Description
For having Wordpress run under OpenVMS, I would like to suggest a change to classes.php. lines 600-616:
These lines contain a mixture of single and double quotes that the HP-PHP engine cannot handle. It's the only place where strings are delimited by single quotes, and values with double, like this (line 600)
if ( $this->is_attachment ) {
$where .= ' AND (post_status = "attachment")';
This causes errors in accessing MySQL via PHP; the very same problem arises when the SQL-command is issues within PHPMyAdmin, though MYSQL itself has no trouble with it.
If this is changed so strings are delimited by double quotes and the values with single:
if ( $this->is_attachment ) {
$where .= " AND (post_status = 'attachment')";
the problems are over.
Secondly, this is more consistent to the rest of the code, for what I have examined.
Attachments (2)
Change History (7)
#1
@
18 years ago
- Milestone set to 2.1
- Summary changed from Proposed change to Single quote around double quote mysql string breaks on OpenVMS HP-PHP
Hi Willem, thank you for participating in WordPress!
"Proposed change" is a really lousy bug Summary.
Next time please attach a patch (preferably also against trunk). I am working on patch now.