Support » Plugin: Lingotek Translation » Deprecated unparenthesized ternary operator

  • Using PHP 7.4 I am getting this error:

    Deprecated: Unparenthesizeda ? b : c ? d : eis deprecated. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in wp-content/plugins/lingotek-translation/admin/filters-columns.php on line 115

    (and again for line 137).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter JohnRDOrazio (CLPTE)

    (@lwangaman)

    This error keeps popping up, here’s a screenshot:

    https://i.imgur.com/PHXioTG.jpg

    Thread Starter JohnRDOrazio (CLPTE)

    (@lwangaman)

    This error is still present, please fix?

    
    Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /wp-content/plugins/lingotek-translation/admin/filters-columns.php on line 115
    
    Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /wp-content/plugins/lingotek-translation/admin/filters-columns.php on line 137
    
    Thread Starter JohnRDOrazio (CLPTE)

    (@lwangaman)

    I believe this plugin is no longer receiving updates? It’s been 4 months since I opened the issue…

    had the same issue, quite easy to fix: open with an FTP explorer this php file:
    wp-content/plugins/lingotek-translation/admin/filters-columns.php

    and replace line 115, 116, 117 with the following

    $lang = ($inline ?
    			$this->model->get_language( $inline_lang_choice ) :
    			'post' === $type) ? PLL()->model->post->get_language( $object_id ) : PLL()->model->term->get_language( $object_id );

    and line 137,138,139 with this:

    $id = (($inline && $lang->slug !== $this->model->get_language( filter_input( INPUT_POST, 'old_lang' ) )->slug) ?
    			($language->slug === $lang->slug ? $object_id : 0) :
    			'post' === $type) ? PLL()->model->post->get( $object_id, $language ) : PLL()->model->term->get( $object_id, $language );
    Plugin Author penyaskito

    (@penyaskito)

    This shouldn’t be an issue anymore.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.