• Resolved craigiswayne

    (@craigiswayne)


    Hi, i’ve found the following variables to be undefined:

    smart-app-banner/wsl-smart-app-banner.php:57
    if ((is_null($app_id_list) or $app_id == "") and

    smart-app-banner/wsl-smart-app-banner.php:177

    
    $global_banner_val = $_POST[ $global_banner_field_name ];
    

    smart-app-banner/wsl-smart-app-banner.php:184

    
    if( $_POST[ $global_banner_field_name ] == "Yes") {
    

    My suggestions below:

    smart-app-banner/wsl-smart-app-banner.php:41

    
      $app_id_list = $app_id = null;
      
      // This is a weird order, but the idea is that if there's a local
      // definition we use that in preference to the global option
    

    smart-app-banner/wsl-smart-app-banner.php:181

    
       $_POST[ $global_banner_field_name ] = isset( $_POST[ $global_banner_field_name ] ) ? $_POST[ $global_banner_field_name ] : '';
       $global_banner_val = $_POST[ $global_banner_field_name ];
    
       // Save the posted value in the database
    

    I’m happy to contribute if i’m given access

    • This topic was modified 6 years, 4 months ago by craigiswayne.
    • This topic was modified 6 years, 4 months ago by craigiswayne.
    • This topic was modified 6 years, 4 months ago by craigiswayne.
    • This topic was modified 6 years, 4 months ago by craigiswayne.
    • This topic was modified 6 years, 4 months ago by craigiswayne.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Side note:

    I’m happy to contribute if i’m given access

    You can contribute without access, please do not ask for that. There’s no need and that’s an unusual ask.

    Thread Starter craigiswayne

    (@craigiswayne)

    I did give it a bash earlier without any luck, this is probably my lack of experience with svn, will give it another go.

    Plugin Author stephend

    (@stephend)

    Is this causing any problems? It’s difficult to tell what configurations of PHP people have… (Just trying to gauge severity. This is obviously a good suggestion.)

    Not sure if there’s a better way, but if you do svn diff and share that output I should be able to merge into my copy.

    Thanks,
    Stephen

    Thread Starter craigiswayne

    (@craigiswayne)

    hi @stephend, thanks, really struggling to figure out how to use svn, but as per your request here’s the diff:

    
    Index: trunk/wsl-smart-app-banner.php
    ===================================================================
    --- trunk/wsl-smart-app-banner.php	(revision 1911837)
    +++ trunk/wsl-smart-app-banner.php	(working copy)
    @@ -37,6 +37,9 @@
     add_action('plugins_loaded', 'wsl_smart_app_banner_init');
     
     function wsl_output_safari_app_banner($post_ID) {
    +  
    +  $app_id = $app_id_list = null;
    +  
       // This is a weird order, but the idea is that if there's a local
       // definition we use that in preference to the global option
       if (! is_front_page()) {
    @@ -174,6 +177,7 @@
             $appid_ipad_val = $_POST[ $appid_ipad_field_name ];
             $affiliate_val = $_POST[ $affiliate_field_name ];
             $argument_val = $_POST[ $argument_field_name ];
    +        $_POST[ $global_banner_field_name ] = isset( $_POST[ $global_banner_field_name ] ) ? $_POST[ $global_banner_field_name ] : '';
             $global_banner_val = $_POST[ $global_banner_field_name ];
     
             // Save the posted value in the database
    
    • This reply was modified 6 years, 4 months ago by craigiswayne. Reason: code block formatting
    • This reply was modified 6 years, 4 months ago by Jan Dembowski. Reason: Fixed formatting
    Plugin Author stephend

    (@stephend)

    Looking good! Thanks for the patch. Merged fine. Am currently testing on my site. It’s in trunk if you’d like try your self. I’ll release a new version in a few days if there are no problems.

    Thread Starter craigiswayne

    (@craigiswayne)

    Sorry for the late reply Stephen, it’s working perfectly thank you ??

    p.s. your website link is spelt incorrectly.

    Plugin Author stephend

    (@stephend)

    Thanks for your patch. I just released version 1.1.2.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Undefined Indexes’ is closed to new replies.