4

On the server (PHP 5.6.38) I have a website in Joomla which works fine, I tried to move it to localhost (Uniserverz XIII - PHP 5.6.30) to test some updates but I get an error when I set $error_reporting = 'development':

Parse error: syntax error, unexpected '}' in C:\UniServerZ\www\site_name\templates\site_temp\html\modules.php on line 64

Here is the code:

function modChrome_myCatMod($module, &$params, &$attribs)
{
    $moduleTag      = $params->get('module_tag', 'div');
    $headerTag      = htmlspecialchars($params->get('header_tag', 'h3'));
    $bootstrapSize  = (int) $params->get('bootstrap_size', 0);
    $moduleClass    = $bootstrapSize != 0 ? ' span' . $bootstrapSize : '';

    // Temporarily store header class in variable
    $headerClass    = $params->get('header_class');
    $headerClass    = ($headerClass) ? ' class="' . htmlspecialchars($headerClass) . '"' : '';

    if (!empty ($module->content)) : ?>
        <<?php echo $moduleTag; ?> class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx')) . $moduleClass; ?>" id="Mod<?php echo $module->id;?>">
            <?php if ((bool) $module->showtitle) : ?>
                <?php $com_content_categories = $params->get('com_content_categories'); if(!empty($com_content_categories)): 
                    $caturl = ContentHelperRoute::getCategoryRoute ( $com_content_categories[0] );
                ?>
                <<?php echo $headerTag . $headerClass . '>' ?><a href="<?php echo $caturl;?>"><?php  echo $module->title; ?></a></<?php echo $headerTag; ?>>                                                    
                <?php else : ?>             
                <<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>                    
                <? endif;?>

            <?php endif; ?><?php echo $module->content; ?>
        </<?php echo $moduleTag; ?>>
    <?php endif; 
}     //////////////////////////////////error line

1 Answer 1

3

Set short_open_tag=On in your php.ini

and restart your Apache server

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.