Can't set negative weight on a channel

jmather - October 23, 2009 - 01:51
Project:Advertisement
Version:6.x-2.1
Component:ad module
Category:bug report
Priority:normal
Assigned:Jeremy
Status:fixed
Description

Not sure if this is fixed in dev, but I noticed in the 6.x.2.1 (may have been reported, but I couldn't find it).

When you update/insert into ad_channel, if the weight is negative you get (from mysql):

Warning (Code 1264): Out of range value adjusted for column 'weight' at row 1

I think the data type needs to be changed, looks like it is a hodgepodge throughout drupal that people use to store weights, I have seen tinyint and int...hmm...

#1

Jeremy - October 23, 2009 - 12:52
Assigned to:Anonymous» Jeremy

Correct, weight is using an unsigned int which clearly can't work. Assigning to myself so I remember to fix this when I have time, before the next release.

#2

Jeremy - November 23, 2009 - 20:06
Status:active» fixed

Fix committed:
http://drupal.org/cvs?commit=293160

 
 

Drupal is a registered trademark of Dries Buytaert.