YOURLS: Column 'country_code' cannot be null

I get the feedback from some users that urls do not work and generate the following error:

Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'country_code' cannot be null in /www/htdocs/w01882f8/pnde/includes/vendor/aura/sql/src/ExtendedPdo.php:748 Stack trace: #0 /www/htdocs/w01882f8/pnde/includes/vendor/aura/sql/src/ExtendedPdo.php(748): PDOStatement->execute() #1 /www/htdocs/w01882f8/pnde/includes/vendor/aura/sql/src/ExtendedPdo.php(306): Aura\Sql\ExtendedPdo->perform('INSERT INTO yo…', Array) #2 /www/htdocs/w01882f8/pnde/includes/functions.php(897): Aura\Sql\ExtendedPdo->fetchAffected('INSERT INTO yo...', Array) #3 /www/htdocs/w01882f8/pnde/includes/functions.php(740): yourls_log_redirect('o') #4 /www/htdocs/w01882f8/pnde/yourls-go.php(21): yourls_redirect_shorturl('https://phantan...', 'o') #5 /www/htdocs/w01882f8/pnde/yourls-loader.php(37): require_once('/www/htdocs/w01...') #6 {main} thrown in /www/htdocs/w01882f8/pnde/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748

This seems to be the case on iOs and Safari, but also on some instances of Firefox on Windows. Probably caused by some anti-tracking solution blocking the users country in some referral.

For most users this works, but I got multiple reports of this proiblem today for the url

http://pnde.eu/o

What can be the problem? Thanks in advance.

Edit: I see that Facebook crippled the error message, I will try to get a complete one and add it here.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (7 by maintainers)

Commits related to this issue

Most upvoted comments

I fixed this issue by updating includes/geo/GeoLite2-Country.mmdb to fresh one.