TheOracle has not been active for a couple of years.
The "fix" in post #4 may have stopped some error from occurring, but it can cause an error at least in some circumstances.
The only change was to move a ) from near the end of the statement to near the beginning (red = removed, green = inserted):
Code:
$noscript_link = '<noscript>' . ($flag_display_large) ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' : $thumb_regular ) . '</noscript>';
The new location is harmless though not necessary, but the original location was necessary to distinguish the scope of the ternary operator.
This takes the form
x ? a : b
where if x (any expression that can be evaluated) is true, then a is performed, and if it is false, b is performed.
Without the last ) to define where the effect of the ternary operator stops, the . '</noscript>' is part of the alternate output and will not occur if $flag_display_large is true.
This is a problem, because we then have an unclosed <noscript> tag in the output.
I had observed numerous times when TheOracle gave incorrect advice while seeming extremely knowledgeable.
Bookmarks