Slight typing error in schema

mikl - August 13, 2008 - 10:44
Project:Scheduler
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

There is a slight error in the schema for scheduler. The default values for 'publish_on', 'unpublish_on' and 'timezone' is set to the string '0' when it should be the integer 0

This is a small thing, I know, but I get an error whenever I use the schema module:

scheduler.publish_on is type int but its default 0 is PHP type string
scheduler.unpublish_on is type int but its default 0 is PHP type string
scheduler.timezone is type int but its default 0 is PHP type string

I've corrected it in the snippet below.

<?php

function scheduler_schema() {
  return array(
   
'scheduler' => array(
     
'description' => t('The main table to hold the scheduler data.'),
     
'fields' => array(
       
'nid' => array(
         
'description' => t('The foreign key to node.nid'),
         
'type' => 'int',
         
'unsigned' => TRUE,
         
'not null' => TRUE,
        ),
       
'publish_on' => array(
         
'description' => t('The UNIX UTC timestamp when to publish'),
         
'type' => 'int',
         
'unsigned' => TRUE,
         
'not null' => TRUE,
         
'default' => 0,
        ),
       
'unpublish_on' => array(
         
'description' => t('The UNIX UTC timestamp when to unpublish'),
         
'type' => 'int',
         
'unsigned' => TRUE,
         
'not null' => TRUE,
         
'default' => 0,
        ),
       
'timezone' => array(
         
'description' => t('The offset in seconds due to the timezone'),
         
'type' => 'int',
         
'unsigned' => TRUE,
         
'not null' => TRUE,
         
'default' => 0,
        ),
      ),
     
'indexes' => array(
       
'scheduler_publish_on' => array('publish_on'),
       
'scheduler_unpublish_on' => array('unpublish_on'),
      ),
     
'primary key' => array('nid'),
    ),
  );
}
?>

#1

Eric Schaefer - November 1, 2008 - 17:26
Status:active» fixed

http://drupal.org/cvs?commit=150429

#2

Eric Schaefer - November 4, 2008 - 17:45

Fixed in 6.x-1.3

--project followup subject--

System Message - November 18, 2008 - 17:46

Automatically closed -- issue fixed for two weeks with no activity.

--project followup subject--

System Message - November 18, 2008 - 17:54

Automatically closed -- issue fixed for two weeks with no activity.

#3

System Message - November 18, 2008 - 18:01
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.