Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing string, returns it inside array #24

Closed
dopesong opened this issue Aug 13, 2016 · 7 comments
Closed

Passing string, returns it inside array #24

dopesong opened this issue Aug 13, 2016 · 7 comments

Comments

@dopesong
Copy link

dopesong commented Aug 13, 2016

@geggleto said he will fix what he broke 馃拑

5bd5f75#diff-8b1b6164c747942bdb2576f146cf4e5eR87

@akrabat
Copy link
Member

akrabat commented Nov 11, 2016

As this change came in as PR #1 and was merged by Josh, I think it's unlikely to change.

@dopesong
Copy link
Author

Maybe @codeguy missed something. @codeguy any thoughts on this?

@jkrehm
Copy link

jkrehm commented Apr 10, 2017

I just ran into this, too. I'm curious why all flashed values are forced into an array when that's just one use case among many.

krotovic pushed a commit to krotovic/Slim-Flash that referenced this issue May 22, 2017
If the $key already exists in the storage, create array with previously flashed message and the current one.
krotovic pushed a commit to krotovic/Slim-Flash that referenced this issue May 22, 2017
@krotovic
Copy link

I have created new pull request that should resolve this. It returns array only if you add more than one message under the same key.

krotovic added a commit to krotovic/Slim-Flash that referenced this issue May 31, 2017
@MrSam
Copy link

MrSam commented Jun 8, 2017

Hmm not sure if that would be expected behaviour. When using type hinting in PHP7.x it should always return the same type, in this case array.

When expecting a single string #29 could be used.

@krotovic
Copy link

Hmm, @MrSam your solution may be better... Until it's available I will have a fork of this repository with my solution implemented and it will be published on Packagist as krotovic/slim-flash so fell free to use it.

I needed it immediately in my project, so please don't consider my actions being rude. I might have only wrap this library but I wasn't thinking about it much and since there are others requesting this feature, this solution might get handy.

akrabat added a commit to akrabat/Slim-Flash that referenced this issue Oct 22, 2017
akrabat added a commit to akrabat/Slim-Flash that referenced this issue Oct 22, 2017
@akrabat
Copy link
Member

akrabat commented Oct 22, 2017

Closed #33

@akrabat akrabat closed this as completed Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants