• Jer Turowetz

    (@jturowetzgmailcom)


    Salut! Large number of php errors due to variables not being initialized. A solution would be to use if(!empty($var)){} to set variables.

    I’m interested in contributing to the project et je peut meme essayer a communique en Francais! If there is a github I can post my revisions.

    Laisser moi savoir !

    • This topic was modified 7 years, 8 months ago by Jer Turowetz.
Viewing 1 replies (of 1 total)
  • Thread Starter Jer Turowetz

    (@jturowetzgmailcom)

    Par example:

    // Contenu du formulaire
    $valueName      = !empty($_POST['AddMediaFromURL_Name']) ? sanitize_text_field($_POST[ 'AddMediaFromURL_Name' ]) : null;
    
    $valueUrl       = !empty($_POST['AddMediaFromURL_Url']) ? sanitize_text_field($_POST[ 'AddMediaFromURL_Url' ]) : null;
    
    $valueUpload    = !empty($_POST['AddMediaFromURL_Upload']) && ( $_POST['AddMediaFromURL_Upload'] === "1" ) ? ' checked' : '';
    
    $service0 = !empty($_POST['AddMediaFromURL_Type'])
                && ( sanitize_text_field($_POST['AddMediaFromURL_Type']) == self::COMBO_OTHER || !isset($_POST['AddMediaFromURL_Type']) )
                ?  ' selected="selected"'
                :  '';
    
    $service1 = !empty($_POST['AddMediaFromURL_Type'])
                && ( sanitize_text_field($_POST['AddMediaFromURL_Type']) == self::COMBO_GDRIVE )
                ? ' selected="selected"'
                : '';
    • This reply was modified 7 years, 8 months ago by Jer Turowetz.
    • This reply was modified 7 years, 8 months ago by Jer Turowetz.
Viewing 1 replies (of 1 total)
  • The topic ‘Undefined index / Undefined variable issue’ is closed to new replies.