• Resolved David Adams

    (@tictag)


    Firstly, thank you for creating and maintaining this plugin – it is very useful!

    I have just updated to v3.2 from v3.1.5 and receive the following error (PHP Notice) in my WP_DEBUG file on every page:

    [15-Mar-2021 22:58:55 UTC] PHP Notice: Undefined variable: located in /home/customer/www/dev.ksa-uk.net/public_html/wp/wp-content/plugins/custom-post-widget/shortcode.php on line 56

    Please help me to understand and resolve this issue.

    FURTHER INFORMATION

    Line 56 in shortcode.php reads:
    if ( ( $located ) ) {

    I am using Content Blocks to add a couple of theme footer elements, just some text, using the code below:

    <!-- wrapper -->
    		<div class="wrapper wrapper-copyright">
    
    			<!-- footer -->
    			<div class="copyright-container" role="contentinfo">
    
    				<!-- copyright -->
    				<div class="copyright clear">
    					<div class="left">
    						<?php echo do_shortcode('[content_block id=547]'); ?>
    					</div>
    					<div class="right">
    						<?php echo do_shortcode('[content_block id=549]'); ?>
    					</div>
    				</div>
    				<!-- /copyright -->
    
    			</div>
    
    		</div>
    		<!-- /wrapper -->
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Johan van der Wijk

    (@vanderwijk)

    Thanks for letting me know about this! I know that notices are completely harmless but they do bother me when I see them in my logs so I am going to fix this anyway.

    It is an easy fix, just need to define $located as an empty variable. I’ll do this in the next release.

    Plugin Author Johan van der Wijk

    (@vanderwijk)

    I have now released v3.2.1 which should fix this notice. Please let me know if this works.

    Thread Starter David Adams

    (@tictag)

    Johan,

    That works perfectly, thank you for being so quick off the mark on this one – outstanding!!

    I will mark this ticket as resolved.

    David.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Notice ‘Undefined variable’ After Update To v3.2’ is closed to new replies.