I noticed that although there is a static cache for the $script variable in url() (which holds either ‘index.php’ or ” depending on the used web server), it is not implemented properly. url() checks if the variable is empty. On Apache, this is always true and the check for other server version is run every time the function is called. Instead, it should check for isset() to only run the check once.

This can also be backported to 5 and 4.7.

CommentFileSizeAuthor
url-isset-script.patch653 byteskkaefer

Comments

m3avrck’s picture

Status: Needs review » Reviewed & tested by the community

Great catch!

dries’s picture

Version: 6.x-dev » 5.x-dev

Committed to CVS HEAD.

drumm’s picture

Version: 5.x-dev » 4.7.x-dev

Committed to 5.

killes@www.drop.org’s picture

Version: 4.7.x-dev » 5.x-dev
Status: Reviewed & tested by the community » Fixed

code has changed too much.

Anonymous’s picture

Status: Fixed » Closed (fixed)