TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 201
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 107
  • Total: 107

Error saving article with no category

Started by flyonthenet, March 31, 2007, 11:59:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flyonthenet

Incorrect integer value: '' for column 'category' at row 1
File: [...]\flyonthenet.com\Sources\TPortalAdmin.php
Line: 995


This happens when I save an existing article with category set as 'none'.
Always reproducible, I'm using Tinyportal 0.9.8

I temporarly patched by myself:


elseif(substr($what,0,19)=='tp_article_category'){
  $val=substr($what,19);
  if(empty($value)) $value = '0';
  if(is_numeric($val) && $val>0)
    db_query("UPDATE {$tp_prefix}articles SET category='$value' WHERE id=$val", __FILE__, __LINE__);
  $go=3;
}





bloc

Thanks for reporting it. In fact, the template should have a value of "0" for the "none" option, which it hasn't. Fixed in v1.0.

This website is proudly hosted on Crocweb Cloud Website Hosting.