Ticket #558 (closed defect: fixed)
themes.php logic fails on windows server
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 0.8.2 |
| Component: | Back-end | Version: | |
| Severity: | critical | Keywords: | has-patch |
| Cc: |
Description
if ( !in_array($activetheme, $themes)) {
this will fail because $activetheme is set to E:
server
forums/bb-templates/xxxxx
and array $themes has it as E:\server\forums/bb-templates/xxxxx
Attachments
Change History
The problem I was trying to solve by storing the full path is that my-templates/ and bb-templates/ may both have a theme with the same name in it. The user should still be able to select either.
Of course, in looking back at that code, that's impossible; directories in my-templates override directories in bb-templates.
Thoughts?
yup i saw that.. and this patch will still make that work.. i have tried it with my themes.. my themes are in my-templates folder
the only issue i see is when you have same theme folder in both.. that is just plain stupid :)
[654] May fix this issue.
I'd like to keep the full path in the option if possible. That way we don't have to do bb_get_themes() (which has to access the filesystem) every time bb_get_active_theme_folder() is called.
- Status changed from assigned to closed
- Resolution set to fixed
Marking this as fixed.
Reopen if problem persists.
- Status changed from closed to reopened
- Resolution fixed deleted
Damn windows!
#625 maybe related
source:trunk/bb-includes/wp-functions.php
var_dump($query); parse_str($query, $qs); if ( get_magic_quotes_gpc() ) $qs = stripslashes_deep($qs); var_dump($qs);
shows
string(65) "theme=J%3A%5Cdev%5Cwordpress%5Cforums%2Fbb-templates%2Fkakumei%2F"
array(1) {
["theme"]=>
string(54) "J:\\dev\\wordpress\\forums/bb-templates/kakumei/"
}
shouldn't it be
string(65) "theme=J%3A%5Cdev%5Cwordpress%5Cforums%2Fbb-templates%2Fkakumei%2F"
array(1) {
["theme"]=>
string(54) "J:\dev\wordpress\forums/bb-templates/kakumei/"
}
any insight any one?
comment:10
follow-up:
↓ 11
mdawaffe — 5 years ago
Also, what version of web server, PHP?
comment:11
in reply to:
↑ 10
;
follow-up:
↓ 15
so1o — 5 years ago
Replying to mdawaffe:
Also, what version of web server, PHP?
I'm on Apache HTTPD 2.2.4, PHP 4.4.7
i'll try and check with PHP 5.2.2 if its gives the same issue
comment:13
mdawaffe — 5 years ago
so1o,
on that same line, can you
var_dump( get_magic_quotes_gpc() ); var_dump( get_magic_quotes_runtime() );
comment:14
mdawaffe — 5 years ago
Also, is WordPress being loaded? What version?
comment:15
in reply to:
↑ 11
so1o — 5 years ago
Replying to so1o:
I'm on Apache HTTPD 2.2.4, PHP 4.4.7 i'll try and check with PHP 5.2.2 if its gives the same issue
my bad on this one.. the php which gave me error was running was 5.2.2.. but it doesnt give me the error on 4.4.7
Replying to mdawaffe:
var_dump( get_magic_quotes_gpc() ); var_dump( get_magic_quotes_runtime() );
var dump give me this
int(1) int(0)
Replying to mdawaffe:
Also, is WordPress being loaded? What version?
nope no wordpress..
comment:16
so1o — 5 years ago
and in both the versions of php the vardump is the same.
comment:17
so1o — 5 years ago
I added another variable dump
var_dump($query); parse_str($query, $qs); var_dump($qs); if ( get_magic_quotes_gpc() ) $qs = stripslashes_deep($qs); var_dump($qs);
here is the output!
string(65) "theme=J%3A%5Cdev%5Cwordpress%5Cforums%2Fbb-templates%2Fkakumei%2F"
array(1) {
["theme"]=> string(54) "J:\\\\dev\\\\wordpress\\\\forums/bb-templates/kakumei/"
}
array(1) {
["theme"]=> string(48) "J:\\dev\\wordpress\\forums/bb-templates/kakumei/"
}
comment:18
so1o — 5 years ago
did some research.. looks like its a bug..
comment:19
mdawaffe — 5 years ago
comment:20
mdawaffe — 5 years ago
- Status changed from reopened to closed
- Resolution set to fixed
comment:21
mdawaffe — 5 years ago
This is now pluggable in wp_parse_str() to work around any PHP bugs.
