Fieldtype, Module


Protected Links

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy


You must be logged in to post.

Issue with 3.1.0, links showing as expired when they aren’t

Support Request

Boiler Room Digital
Boiler Room Digital


Couple of issues - firstly a hopefully simple one. I had 3.0.0 installed (on a 3.5.17 EE install). I uploaded the files for 3.1.0. I’ve clicked the Update to 3.1.0 button, and it’s now showing that 3.1.0 is installed, but I still see the update button. Not sure what is going on here.

Secondly, I use Protected Links to hide links to Photos which I store above the web root, so they’re only available for logged in users. As a Super Admin, these were working fine, but for all other users, the photos weren’t appearing - the error was that the Link had Expired. None of the links have an expiry date in the database. I found that because the expiry date column was a number, an empty expiry returns “0” rather than an empty string. Thus editing line 87 of mod.protected_links.php to:

      if ($link_q->row(‘expires’)!=’’ && $link_q->row(‘expires’)!=0 && ee()->localize->now > $link_q->row(‘expires’))


      if ($link_q->row(‘expires’)!=’’ && ee()->localize->now > $link_q->row(‘expires’))

Prevented the error. Does this seem sensible? Is this a bug?

Yuri Salimovskiy
# 1
Yuri Salimovskiy

Thanks for catching this! The !=0 check was present in few places, but not everywhere.
The new version has been packaged and uploaded to devot:ee (no version number update)

Boiler Room Digital
# 2
Boiler Room Digital