PDOException when using xx. as node id

Created on 1 June 2016, about 8 years ago
Updated 31 March 2024, 2 months ago

Environment: drupal 7.43, php 5.5

When I access (for example )
www.vtad.de/node/1.
(instead of 1) I get

PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '1.': UPDATE {node_counter} SET daycount=daycount + 1, totalcount=totalcount + 1, timestamp=:db_update_placeholder_0 WHERE ( (nid = :db_condition_placeholder_0) ); Array ( [:db_update_placeholder_0] => 1464776019 [:db_condition_placeholder_0] => 1. ) in statistics_exit() (Zeile 73 von /home/www/vtad7/modules/statistics/statistics.module).

A quick and dirty correction is to insert intval() in line 65 statistics.module:
->key(array('nid' => intval(arg(1))))

πŸ› Bug report
Status

Active

Version

7.0 ⚰️

Component
StatisticsΒ  β†’

Last updated 1 day ago

No maintainer
Created by

πŸ‡©πŸ‡ͺGermany Morn

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024