Title: syntax error in version 2.3.8
Last modified: August 18, 2020

---

# syntax error in version 2.3.8

 *  Resolved [Jayanta](https://wordpress.org/support/users/jkmwp/)
 * (@jkmwp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/)
 * I’m getting this error in the debug log
 *     ```
       Parse error: syntax error, unexpected 'dwqa' (T_STRING), expecting ')' in
       /wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(52) : eval()'d code on line 7
       ```
   
 * When I revert back to 2.3.7, the problem is gone.
    Please help. Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsyntax-error-in-version-2-3-8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273037)
 * Hello.
 * According to the message, the error is in one of your snippets, which is located
   on this page of the site. Check the snippet. Also in the latest version, the “
   Execute shortcodes in snippets” option was added to the plugin settings. If you
   use shortcodes in snippets, enable this option.
 *  Thread Starter [Jayanta](https://wordpress.org/support/users/jkmwp/)
 * (@jkmwp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273064)
 * I enabled the option “Execute shortcodes in snippets”, but still the error occurred.
   
   And the code snippet was always working till the new version of your plugin. 
   I cannot find an error. Could you please check? I’m posting the snippet here:
 *     ```
       if(isset($_GET['redirect']) && ($_GET['redirect'] == base64_encode('guest'))){
       echo do_shortcode( "[dwqa-submit-question-form]" );
       } else if(isset($_GET['success'])){
       echo "<div class='submit-dwqa-question dwqa-container'> <p style='background-color: #dff0d8; padding: 5px; border: 1px solid #dff0d8; border-radius: 5px; display: block; color: #3c763d; text-align: center;'>Thanks for your question! You'll receive an email when we answer.</p></div>";
       }
       else{
       	if(!is_user_logged_in()) {
       echo '<div id="ask-login-message">
       <span style="font-size:18px;">Please login to ask a question.</span><br>
       <a href="/login?redirect_to=/ask" class="button">Login</a><br>
       <span style="font-size:18px;">New to this site?</span><br>
       <a href="/memberships" class="button">Register Now (free)</a><br>';
       echo "<a style='font-size:12px; cursor: pointer;' onclick='window.location.href=\"?redirect=".base64_encode("guest")."\"'>Continue as a guest</a>";
       echo '</div>';	
       } else{
       echo do_shortcode( "[dwqa-submit-question-form]" );
       }
       }	
       ```
   
 *  Thread Starter [Jayanta](https://wordpress.org/support/users/jkmwp/)
 * (@jkmwp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273069)
 * You can see this working on the live site here with Woody snippet version 2.3.7:
   
   [https://englicist.com/ask](https://englicist.com/ask)
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273099)
 * What if you disable the “Execute shortcodes in snippets ” option?
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273119)
 *     ```
       if ( isset( $_GET['redirect'] ) && ( $_GET['redirect'] == base64_encode( 'guest' ) ) ) {
       	?>
       	[dwqa-submit-question-form]
       	<?php
       } else if ( isset( $_GET['success'] ) ) {
       	echo "<div class='submit-dwqa-question dwqa-container'> <p style='background-color: #dff0d8; padding: 5px; border: 1px solid #dff0d8; border-radius: 5px; display: block; color: #3c763d; text-align: center;'>Thanks for your question! You'll receive an email when we answer.</p></div>";
       } else {
       	if ( ! is_user_logged_in() ) {
       		echo '<div id="ask-login-message">
       			<span style="font-size:18px;">Please login to ask a question.</span><br>
       			<a href="/login?redirect_to=/ask" class="button">Login</a><br>
       			<span style="font-size:18px;">New to this site?</span><br>
       			<a href="/memberships" class="button">Register Now (free)</a><br>';
       		echo "<a style='font-size:12px; cursor: pointer;' onclick='window.location.href=\"?redirect=" . base64_encode( "guest" ) . "\"'>Continue as a guest</a>";
       		echo '</div>';
       	} else {
       		?>
       		[dwqa-submit-question-form]
       		<?php
       	}
       }
       ```
   
 * You can also try this with the option enabled
 *  Thread Starter [Jayanta](https://wordpress.org/support/users/jkmwp/)
 * (@jkmwp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273121)
 * Oh, I see! I just disabled the option and it works fine.
 * But wait! The shortcodes used in other snippets are not working now. They are
   printed as raw shortcodes as it should be.
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273138)
 * You need to bring everything to one view:
    either you use do_shortcode () everywhere,
   and this option is disabled, or you use shortcodes directly in the code everywhere,
   and this option is enabled.
 *  Thread Starter [Jayanta](https://wordpress.org/support/users/jkmwp/)
 * (@jkmwp)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273146)
 * You’re right. Now I get this. Thanks so much Artem.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘syntax error in version 2.3.8’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Jayanta](https://wordpress.org/support/users/jkmwp/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/syntax-error-in-version-2-3-8/#post-13273146)
 * Status: resolved