Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
Passing config params to an Orm Observer
That might work if it's in the current namespace. But the props are accessed like so: $props = $class::observers(get_class($this)); which fails since get_class() returns a fully qualified classname, including namespace, but the props are store…
Comment by
WanWizard
December 2017
permalink
Passing config params to an Orm Observer
class names in strings must always be fully qualified, so 'Encryption' => array( is not correct, you need to include the namespace in there, like you do for the other two.
Comment by
WanWizard
December 2017
permalink
Passing config params to an Orm Observer
Maybe this helps. This is one of our observers, that uses properties: https://bin.fuelphp.com/snippet/view/OX The observer is defined in the model like so: https://bin.fuelphp.com/snippet/view/OY
Comment by
WanWizard
December 2017
permalink
query on multi-categories
You can do that using DB::expr(), but the question is if this is the correct design. It is probably better, from a design point of view, to change the relation post-category to a many-many, which is clearly is.
Comment by
WanWizard
December 2017
permalink
HMVC in CLI
Ideally, everything request related should be maintained at the request level, and not global. Implementing it however would mean a major rewrite. I'll try to find a workaround for this issue. As to the extension, I suggest you follow https://…
Comment by
WanWizard
December 2017
permalink
ORM relationship conditions
Then you have a database design problem. A key always needs to be unique within the relation. If you have multiple relations to the same information, use a compound key to make the key unique, and use the condition in the relation to place a filter…
Comment by
WanWizard
December 2017
permalink
ORM relationship conditions
You MUST always define a relation from both sides, if you don't, you get all sorts of weird errors, based on the type of query you run. And one side (the side that has the foreign key) of the relation MUST always be a belongs_to (except for a m…
Comment by
WanWizard
December 2017
permalink
ORM relationship conditions
String vs Int is not an issue, a lot of the PHP drivers (notably MySQL) convert to string. If it is really a type issue, you would see a RDBMS error to that effect (PostgreSQL for example does this). You have defined your relationship properly: site…
Comment by
WanWizard
December 2017
permalink
HMVC in CLI
That is not related to the HMVC request, but to your controller implementation. Your controller code creates a new form instance with either a fixed name, or with the default name. Since HMVC processes run in the same PHP context, only one of these …
Comment by
WanWizard
December 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
In PHP 7.1, yes: php > class 官话官話 {}php >
Comment by
WanWizard
December 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
It is part of properly dealing with multibyte support anyway. As I wrote earlier, all instances in the framework of the functions mentioned in http://php.net/manual/en/mbstring.overload.php need to be looked at, and to be made multibyte aware if ne…
Comment by
WanWizard
December 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
It looks like the bug isn't fixed (the ticket mentions it actually can't be fixed due to the inconsistency between lower- and uppercase I), but worked around. The test code provided in this ticket indeed doesn't fail anymore from PHP …
Comment by
WanWizard
December 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
I see, thanks for the test code, this clarifies things! Two points. I made a mistake, to overload strtolower(), you need to set func_overload to 2, not to 1. And appearently you can not set func_overload using ini_set(), you need to set it either in…
Comment by
WanWizard
November 2017
permalink
Non primary key relation triggers New relation set on object wasn't found exception
You can not define relations on arbitrary fields, it has to be "foreign key -> primary key". Something else is not supported at the moment. If you desire this functionality, please create a feature request for it at https://github.com/f…
Comment by
WanWizard
November 2017
permalink
Return array
And I assume your table has these fields too? If so, this should work without problems: $data = Model_User::find('all');foreach ($data as $record){ echo $record->id, $record->email, $record->name, ' ';} You can enabl…
Comment by
WanWizard
November 2017
permalink
Return array
No idea what Model_User is and does, so you have to give a bit more information.
Comment by
WanWizard
November 2017
permalink
Shutdown event issue
Should work. But I doubt if it makes any difference, PHP closes all connections automatically on shutdown, The PDO object has a destructor that closes the connection if not already closed. There are a lot of possible causes for this warning. I find…
Comment by
WanWizard
November 2017
permalink
Https configuration
That explains! Good you found the issue, and thanks for the feedback.
Comment by
WanWizard
November 2017
permalink
Https configuration
I doubt that is the problem, since loading assets over HTTPS works fine. I'd rather think the problem is in your rewrite rules. The default .htaccess that is suppied by Fuel works on both http and https sites. so if you start by reinstating th…
Comment by
WanWizard
November 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
No, it depends on what the problem is, as there are two possible causes. The correct approach would be to disable it: ini_set('mbstring.func_overload', 0), but I can't guarantee that the current framework code is 100% multibyte safe. …
Comment by
WanWizard
November 2017
permalink
Https configuration
Possible, I don't know. Doesn't HTTPS work at all, or only not when you try to redirect? And why do you get a "forbidden" when you try to access assets over HTTP?
Comment by
WanWizard
November 2017
permalink
Https configuration
Any hardcoded HTTP in your app config?
Comment by
WanWizard
November 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
I've created an issue for it to get this addressed: https://github.com/fuel/core/issues/2077
Comment by
WanWizard
November 2017
permalink
FuelPHP autoloader fails while using az_AZ locale
The Fuel core was writting for PHP versions that automatically swap those functions for their MB equivalents when available. In those versions, mbstring.func_overload in php.ini was enabled. As of PHP 7, it seems to be disabled by default, and as of…
Comment by
WanWizard
November 2017
permalink
CSRF token problem report
Thanks for the confirmation.
Comment by
WanWizard
November 2017
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,366
Last Active
April 29
Roles
Administrator