I get an error Unparenthesized `a ? b : c ? d : e` [duplicate]

I get an error on one of my WordPress plugins, I know it is a php version related error, but I am not able to find the solution, tried many variant but with no luck

value="<?php isset($results->value) && !empty($results->value) ? print_r($results->value) : '' ?>" <?php isset($results->value) && !empty($results->value) ? '' : !empty($results->id) ? print_r('disabled="disabled"') : ''; ?>/> 

Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e)

Can you help me figure it out?
Thanks!