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

Issue in Open Web Analytics version 1.6.6 #492

Closed
GaneshKandu opened this issue Mar 26, 2020 · 11 comments
Closed

Issue in Open Web Analytics version 1.6.6 #492

GaneshKandu opened this issue Mar 26, 2020 · 11 comments

Comments

@GaneshKandu
Copy link
Contributor

@GaneshKandu GaneshKandu commented Mar 26, 2020

Hi,

1-

I am getting error in Open Web Analytics version 1.6.6 on PHP 5.3.

Parse error: syntax error, unexpected '[' in owa_base.php on line 89

On this particular line of the code is

"function getMsg($code, $substitutions = []) {".

This syntax is supported since PHP 5.4 and is causing error on PHP 5.3.

2-

I tried manual installation of Open Web Analytics version 1.6.6 on PHP 5.4. then i face another issue on PHP 5.5, 5.6.

Parse error: syntax error, unexpected 'isSet' (T_ISSET), expecting identifier (T_STRING) in owa_template.php on line 1041

Its working on php 7.0

Requirement mentioned here is PHP 5.3 Technical Requirements

Is requirement of Open Web Analytics changed to 7.0 ?

@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 26, 2020

@Maaiins I think this is from one of your patches. Can you patch using array() syntax instead?

@GaneshKandu

This comment has been minimized.

Copy link
Contributor Author

@GaneshKandu GaneshKandu commented Mar 26, 2020

What about 2 ?

Parse error: syntax error, unexpected 'isSet' (T_ISSET), expecting identifier (T_STRING) in owa_template.php on line 1041
@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 26, 2020

That one is a little trickier... The issue is that isSet is a reserved name in PHP 5.x but not in PHP 7+. So we need to change that method name to something like isValueSet and then modify code wherever it's used.

@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 26, 2020

I just pushed a commit for the second issue but sadly i attached it ot the wrong issue number!

Here it is d97b73f

@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 26, 2020

Will let @Maaiins patch his code :)

@Maaiins

This comment has been minimized.

Copy link
Collaborator

@Maaiins Maaiins commented Mar 26, 2020

@padams the shorthand PHP Array Syntax was introduced I think in PHP 5.5 or 5.4.
As you can see here: https://www.php.net/supported-versions.php PHP 5.3 is already out of support.
In my opinion it´s not the correct way to support already end of life versions. This is also an security issue by using old PHP Versions, but if you want to do this I will change it.

Any thoughts? Maybe we should update the technical specs?

@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 26, 2020

Agreed. Let’s patch this and push out a new release. Then I’ll bump the required php version to 5.6

@Maaiins

This comment has been minimized.

Copy link
Collaborator

@Maaiins Maaiins commented Mar 26, 2020

I will do it tomorow

@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 27, 2020

Thanks. that convention is also used a lot in the new messages.php.

@Maaiins

This comment has been minimized.

Copy link
Collaborator

@Maaiins Maaiins commented Mar 27, 2020

I found some problem, the updated dependencies eg. PHPMailer also using the new convention.
I think it´s much easier to bump the needed PHP Version, there shouldn't be that much PHP 5.3 installations out there. As you can see it´s end of life for more than three years now.

Any thoughts?

@padams

This comment has been minimized.

Copy link
Collaborator

@padams padams commented Mar 27, 2020

Yeah you are right this is a can of worms.

@padams padams closed this Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.