Support » Plugin: WP Hashed IDs » Undefined Index (notice) hashed_id

  • Hi, this is simple Notice, but but I tried the solution.
    I would like to have an opinion on the method and if maybe there is an ideal solution.

    
    function _hashed_id_parse_request($qv) {
    
    if ( isset( $qv->query_vars['hashed_id'] ) )
       $hashed_id = $qv->query_vars['hashed_id'];
    
          else
    
       $hashed_id = '';
    
       // $hashed_id = $qv->query_vars['hashed_id'];
    

    Great,
    Regards.
    Mario

Viewing 1 replies (of 1 total)
  • Better to return early without any changes to avoid overwriting pagename…

    
    function _hashed_id_parse_request($qv) {
        if ( ! isset( $qv->query_vars['hashed_id'] ) ) {
            return $qv;
        }
    
        // ...
    
Viewing 1 replies (of 1 total)
  • The topic ‘Undefined Index (notice) hashed_id’ is closed to new replies.