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

Error qa-donut-layer.php #22

Closed
yerbol89 opened this issue Aug 14, 2015 · 5 comments
Closed

Error qa-donut-layer.php #22

yerbol89 opened this issue Aug 14, 2015 · 5 comments
Assignees
Labels

Comments

@yerbol89
Copy link

I use q2a dev version. https://github.com/q2a/question2answer/tree/dev

[Fri Aug 14 11:31:53 2015] [error] [client 90.143.49.17] PHP Parse error: syntax error, unexpected '@' in /var/www/szh/data/www/szh.kz/test/qa-theme/Donut-dev/qa-donut-layer.php on line 1277, referer: http://szh.kz/test/admin/general

amiyasahu added a commit that referenced this issue Aug 14, 2015
Fixed issue for older PHP version
@amiyasahu
Copy link
Owner

It should work now . Can you please check and let me know

@amiyasahu amiyasahu added the bug label Aug 14, 2015
@amiyasahu amiyasahu self-assigned this Aug 14, 2015
@yerbol89
Copy link
Author

@amiyasahu i edit this code. After i see error log.
[Fri Aug 14 17:27:51 2015] [error] [client 2.132.176.131] PHP Parse error: syntax error, unexpected '=', expecting ')' in /var/www/szh/data/www/szh.kz/test/qa-theme/Donut-dev/templates/top-header.php on line 6

After i edit top-header.php

<?php $header_left_text = donut_opt( 'top_bar_left_text'); ?>
<?php if (!empty( $header_left_text )): ?>
<?php echo $header_left_text ?>
<?php endif ?>

and

<?php $header_right_text = donut_opt( 'top_bar_right_text' ); ?>
<?php if ( !empty( $header_right_text ) ): ?>
<?php echo $header_right_text ?>
<?php endif ?>

Now its nice work. I use PHP Version 5.3.3-7+squeeze26

@amiyasahu
Copy link
Owner

can you paste here what did you edited . I am using PHP 5.6 , thats why I am not seeing these errors .

@yerbol89
Copy link
Author

You code:

<?php if ( !empty( $header_left_text = donut_opt( 'top_bar_left_text' ) ) ): ?>
<?php echo $header_left_text ?>
<?php endif ?>
<?php if ( !empty( $header_right_text = donut_opt( 'top_bar_right_text' ) ) ): ?>
<?php echo $header_right_text ?>
<?php endif ?>

My code:

After i edit top-header.php

<?php $header_left_text = donut_opt( 'top_bar_left_text'); ?>
<?php if (!empty( $header_left_text )): ?>
<?php echo $header_left_text ?>
<?php endif ?>

and

<?php $header_right_text = donut_opt( 'top_bar_right_text' ); ?>
<?php if ( !empty( $header_right_text ) ): ?>
<?php echo $header_right_text ?>
<?php endif ?>

@amiyasahu
Copy link
Owner

ok , This clearly this is due to the PHP version . I will update soon .

amiyasahu added a commit that referenced this issue Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants