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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htmlentities() expects parameter 1 to be string, array given #62

Closed
WickedSik opened this issue Apr 20, 2016 · 11 comments
Closed

htmlentities() expects parameter 1 to be string, array given #62

WickedSik opened this issue Apr 20, 2016 · 11 comments
Labels
WIP Working in progress.
Milestone

Comments

@WickedSik
Copy link

The source of this problem:

@foreach($dirs as $key => $dir)
        <li>
            <a class="pointer" id="folder_{{ $key }}" data-id="{{ $dir }}" onclick="clickFolder('folder_{{ $key }}', 0)">
                <i class="fa fa-folder folder-item" data-id="{{ $dir }}" id="{{ $dir }}-folder"></i> {!! $dir !!}
            </a>
        </li>
@endforeach

The fix isn't that difficult, actually. The reason this is happening, is because $dir contains 2 elements, with the keys short and long. While I do not exactly know which ones are needed, this was sitting in the 1.5.2 branch, and hasn't been fixed in master since.

Could it be that my version is broken or mismatched? I did check the vendor folder to see whether it was just my views, or whether it was in the package itself, and the conclusion of that is just above.

@WickedSik
Copy link
Author

Combined with #58 this is giving me a sustaining headache. If you guys need help, I'd gladly partake

@bikedel
Copy link

bikedel commented May 29, 2016

so how did you fix it?

@WickedSik
Copy link
Author

@bikedel This hasn't been fixed yet

@bikedel
Copy link

bikedel commented May 30, 2016

Hello
I got it working by using basename

@foreach($dirs as $key => $dir)

    <li>
        <a class="pointer" id="folder_{{ $key }}" data-id="{{ basename($dir) }}" onclick="clickFolder('folder_{{ $key }}', 0)">
            <i class="fa fa-folder folder-item" data-id="{{ basename($dir) }}" id="{{ basename($dir) }}-folder"></i> {!! str_limit(basename($dir), $limit = 10, $end = '...') !!}
        </a>
    </li>
@endforeach

@streamtw
Copy link
Member

streamtw commented Jun 1, 2016

The basename() function cannot read utf-8.

@joshuadegier
Copy link
Contributor

No fix yet? Keeps poppin' up in my error log.

@streamtw streamtw added the bug Behaviors that do not meet expectation. label Jun 20, 2016
@streamtw streamtw added this to the v1.6 milestone Jun 20, 2016
@streamtw
Copy link
Member

streamtw commented Jun 28, 2016

@WickedSik @bikedel @PendoNL the codes you pasted were modified since this commit : 24cf788#diff-f582901cf732e05dc4419a580f79fbffR10
Please update to dev-master to check if this issue still exists.

@WickedSik #58 will be fix within next milestone .

@streamtw streamtw reopened this Jun 28, 2016
@streamtw streamtw added help wanted and removed bug Behaviors that do not meet expectation. labels Jun 28, 2016
@streamtw
Copy link
Member

streamtw commented Jun 29, 2016

@WickedSik @bikedel @PendoNL
Fix in 707a1fb, please update to dev-master to check if the issue still exists.

@streamtw streamtw added WIP Working in progress. and removed help wanted labels Jun 29, 2016
@joshuadegier
Copy link
Contributor

I can't update the project right now (heading for holidays real soon and can't have an update break the project right now). Will test as soon as I get back (in 4 weeks).

@streamtw
Copy link
Member

streamtw commented Aug 3, 2016

We have released v1.6, please update to check if the issue still exists.

@streamtw streamtw closed this as completed Aug 3, 2016
@joshuadegier
Copy link
Contributor

Looks like the issue is solved, error hasn't come back in the logs since updating. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Working in progress.
Projects
None yet
Development

No branches or pull requests

4 participants