• Resolved RichTWebGuy

    (@richtwebguy)


    in public static function getSnippet( $name, $variables = '' )
    shouldn’t $snippet have some value if $name is not found in the $snippets array?

Viewing 5 replies - 1 through 5 (of 5 total)
  • A.Tariq

    (@arsalantariq)

    Hi @richtwebguy,

    If the snippet is not found then this function returns an empty value (NULL). based on this the developer can add any condition to the code. So we think this function is perfectly set from the developer’s point of view.

    Thanks

    Thread Starter RichTWebGuy

    (@richtwebguy)

    $result = PostSnippets::getSnippet('NoSuchSnippet');

    Warning: Undefined variable $snippet in .../wp-ctnt975/plugins/post-snippets/post-snippets.php on line 208

    this doesn’t happen if

    $snippet = null;

    is added to the top of PostSnippets::getSnippet

    A.Tariq

    (@arsalantariq)

    Hi @richtwebguy,

    Thanks for pointing out the issue, We will add this improvement in our upcoming update.

    Thanks

    Thread Starter RichTWebGuy

    (@richtwebguy)

    Did the development forget about this?
    Annoying that the problem comes back on every plugin update.

    Thanks.

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @richtwebguy,

    The update with this patch hasn’t been released yet, we are doing some major improvements to the plugin code and adding some extra functionalities. We will let you know when the update gets released.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘$snippet never set’ is closed to new replies.