fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Uri::main() execution problem on HMVC request #1641

Closed mitsu7788 closed 10 years ago

mitsu7788 commented 10 years ago

\Uri::main() returns the active URI on HMVC context when main request URI is an empty string (i.e. http://mydomain/)

codeChap commented 10 years ago

Try: http://fuelphp.com/docs/classes/uri.html#/method_current

WanWizard commented 10 years ago

@mitsu7788,

Is it fixed if you change L#155 to is_null($uri) and $uri = static::string(); ?

mitsu7788 commented 10 years ago

@codeChap

Thank you for your suggestion.

@WanWizard

Yes, my problem has been resolved.

mitsu7788 commented 10 years ago

Sorry, I found one side effect.

If form action is empty string, Form::open() doesn't generate current url.

my workaround: form/instance.php

109 > if( ! array_key_exists('action', $attributes) or $attributes['action'] === null)

to

109> if( ! array_key_exists('action', $attributes) or $attributes['action'] === null or $attributes['action'] === '')