Welcome Guest, Not a member yet? Register   Sign In
Syntax error, parse error, unexpected
#1

Hello

I am getting the following message:

Parse error: syntax error, unexpected 'yield' (T_YIELD) in /home2/angelsc4/public_html/admin/bonfire/themes/default/index.php on line 8

the code is
<?php echo theme_view('parts/_header'); ?>


<div class="container body narrow-body"> <!-- Start of Main Container -->

<?php

    echo Template::message();
    echo isset($content) ? $content : Template::yield();
?>

<?php echo theme_view('parts/_footer'); ?>






can anyone suggest how to resolve this problem
Reply
#2

What version of PHP are you using? I believe the problem might be that, starting with PHP v5.5, "yield" is a keyword. Maybe some third-party library you are using is obsolete?
Reply
#3

this is the comment in the htacces file;# Use PHP5.4 Single php.ini as default AddHandler application/x-httpd-ea-php56 .php

so we are using 5.4

cannot seem to figure what is the problem
Reply
#4

(This post was last modified: 04-25-2019, 09:33 AM by dave friend.)

The comment says you need to use PHP 5.4, but are you actually doing that? What does phpinfo() show?
Reply
#5

I am getting a new message

Fatal error: Call to undefined method Template::yield()
Reply
#6

Are you sure you have all of the files installed it's saying it cannot find the yield() method.

See if you have a Template Class.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB