New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yourls_get_option( 'version' ) not giving current version #2501

joshp23 opened this Issue Jan 27, 2019 · 1 comment


None yet
2 participants
Copy link

joshp23 commented Jan 27, 2019

In latest pull from master branch:

On line 1071 of ./includes/functions.php
$currentver = yourls_get_option( 'version' );

Resulting value of $currentver (what is in database)

On line 6 of ./includes/version.php
define( 'YOURLS_VERSION', '1.7.4' );

Apparently, nothing is triggering
yourls_update_option( 'version', YOURLS_VERSION )
when the base code version is updated but the database version is not.

@joshp23 joshp23 changed the title yourls_get_option( 'version' ) not updating yourls_get_option( 'version' ) not giving current version Jan 27, 2019

joshp23 added a commit to joshp23/YOURLS that referenced this issue Jan 27, 2019

auto-update YOURLS version in database
Addresses YOURLS#2501 by checking `YOURLS_VERSION` against the stored value in the database during `yourls_upgrade_is_needed()` and triggering an update to the stored value if base code version is greater.

This comment has been minimized.

Copy link

ozh commented Jan 27, 2019

Indeed, nice catch. For the record, the stored version in the option table on my test box was still "1.5.1-beta" :) This hasn't caused any conflict so far because there hasn't be any need till now, but it could have been a major PITA to debug this in the future when we need it. Again, nice catch :)

@ozh ozh closed this Jan 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment