• Resolved strarsis

    (@strarsis)


    It would be nice if the warning

    Notice: Undefined offset: 0 in /var/www/web/app/plugins/page-title-splitter/pts.php on line 25

    can be fixed in plugin code by changing the line 25 in pts.php from

    
        echo '<script language="javascript">var _pts_output = "'.$pts_output[0].'";</script>';
    

    to

        
        if(!empty($pts_output) > 0) {
          echo '<script language="javascript">var _pts_output = "'.$pts_output[0].'";</script>';
        }
    

    And a different warning can also be fixed by replacing line ~47 from

    
    		if(isset($_POST))
    

    to

    
    		if(isset($_POST['pt-splitter-output']))
    

    Thanks!

    • This topic was modified 8 years ago by strarsis.
Viewing 1 replies (of 1 total)
  • Thread Starter strarsis

    (@strarsis)

    Edit:

    The first fix causes an issue and should rather use this code instead:

    
        if(empty($pts_output)) $pts_output[0] = '';
    
    • This reply was modified 8 years ago by strarsis.
Viewing 1 replies (of 1 total)
  • The topic ‘Fix warning’ is closed to new replies.