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

1.8.0 beta 3 - dies on PHP 5.3 #1141

Closed
Stefan-MyBB opened this issue Aug 9, 2014 · 1 comment
Closed

1.8.0 beta 3 - dies on PHP 5.3 #1141

Stefan-MyBB opened this issue Aug 9, 2014 · 1 comment
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Milestone

Comments

@Stefan-MyBB
Copy link
Contributor

MyBB 1.8.0 beta 3 dies on PHP 5.3 both front end and back end

Code:
Parse error: syntax error, unexpected '[' in /inc/functions.php on line 3074

DEBUG
3074                    $smilie['find'] = explode("\n", $smilie['find'])[0];

Original thread: 1.8.0 beta 3 - dies on PHP 5.3

@Stefan-MyBB Stefan-MyBB added this to the 1.8.0 milestone Aug 9, 2014
@Nik101010
Copy link
Contributor

accessing an array field directly in a function calls return is a php 5.4 feature... older php versions need a temporary var instead...

$temp = explode();
$smilie['find'] = $temp[0];

Nik101010 added a commit to Nik101010/mybb that referenced this issue Aug 9, 2014
php 5.3 does not support the direct access to arrays in a function's return

* inc/functions.php
  * added temporary varialble in build_clickable_similies function to assure php 5.3 support
Nik101010 added a commit to Nik101010/mybb that referenced this issue Aug 9, 2014
*misc.php
  * added temporary variable like in inc/functions.php
Destroy666x added a commit that referenced this issue Aug 9, 2014
fix: 1.8.0 beta 3 - dies on PHP 5.3, refs #1141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Projects
None yet
Development

No branches or pull requests

3 participants