We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

minor bug in ow_core/request.php and getRequestUri() | Forum

Regis Grison
Regis Grison Mar 22 '12
Hi,

If my post is not on the right place, please tell me.

My local installation gave me a warning:
Message: mb_strpos() [function.mb-strpos]: Empty delimiter
File: ow_core/request.php
Line: 110

Line 104 made a test with a "===" instead of a "==".
As my installation is on a subdomain, the $urlArray['path'] is "/" and removeFirstAndLastSlashes() returned false so the program ran to line 110 with a $originalPath that is false and strpos does not like it. Remove a "=" on line 104 make this test go to line 106 instead and this is the correct behaviour.

I attached a patch that do the same as explained here.

Regards.

Regis.
Regis Grison
Regis Grison Mar 22 '12
.patch file was rejected, here it is as a .txt file
Attachments:
  oxwall_getRequestUri_patch.txt (0.77Kb)
Michael I.
Michael I. Mar 23 '12
Are you sure your local server meets our requirements?
Regis Grison
Regis Grison Mar 27 '12
Yes of course!

What I did is really a fix:
- if you read the original code, there is a case that goes to the wrong part of the if()
- if you make the correction, it works even in this case and do not change anything in the other cases

Regards.


Michael I.
Michael I. Apr 2 '12
Thanks Regis, I will ask our developers to take a look at your fix.