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

Joomla 3.5: Parse error in Smart Search on PHP 5.3.29 #9561

Closed
khanhlh opened this issue Mar 24, 2016 · 6 comments
Closed

Joomla 3.5: Parse error in Smart Search on PHP 5.3.29 #9561

khanhlh opened this issue Mar 24, 2016 · 6 comments

Comments

@khanhlh
Copy link
Contributor

khanhlh commented Mar 24, 2016

Steps to reproduce the issue

Enable Smart Search component and create a menu item to it.

Expected result

Smart search page

Actual result

Parse error: syntax error, unexpected '[', expecting ')' in components/com_finder/helpers/html/filter.php on line 112

System information (as much as possible)

PHP 5.3.29

Additional comments

Can be fixed by change line 112 in components/com_finder/helpers/html/filter.php
From

$html .= JHtml::_('bootstrap.startAccordion', 'accordion', array('parent' => true, 'active' => 'accordion-' . array_keys($branches)[0]));

To

$branch_keys = array_keys($branches);
$html .= JHtml::_('bootstrap.startAccordion', 'accordion', array('parent' => true, 'active' => 'accordion-' . $branch_keys[0]));
@infograf768
Copy link
Member

I confirm the error.
@wilsonge
I guess this is another blocker

@brianteeman
Copy link
Contributor

Weird -I get it on 5.3.29 but not on 5.4.42 or higher

On 24 March 2016 at 09:40, infograf768 notifications@github.com wrote:

I confirm the error.
@wilsonge https://github.com/wilsonge
I guess this is another blocker


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#9561 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@infograf768
Copy link
Member

I get it on 5.3.14
The proposed change sloves it,
Now testing on 5.4.4
If it works, will propose the PR

@infograf768
Copy link
Member

It does. Making PR now.

@infograf768
Copy link
Member

Please test #9562

@brianteeman
Copy link
Contributor

Closed as we have a PR for testing

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

No branches or pull requests

4 participants