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,966
  • Latest: safir45
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 319
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 174
  • Total: 174

Wrong value type sent to the database. Integer expected. (week)

Started by moto~man, January 02, 2012, 08:37:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

Thanks for the heads up F0L. What I'd like to know is why it suddenly stopped working after the new year changed...

feline

the data function returns a string ..
string date ( string $format [, int $timestamp = time() ] )
and date('W', ...) returns ' 1' not '1'  ;)

PortaMx released the Portax-Forum Version 1.2 with revolutionary features, which has no other Forum.

IchBin

Yeah I understand that Feline. My question is, why did this problem just appear now? This is code that Bloc wrote a long time ago, and it's been in use for quite some time. So something has changed that made this error suddenly to appear. The error should have been happening ever since I converted all the database queries to use $smcFunc, which was quite a long time ago.


ratbat

I don't know if this has something to do with our problem. After implementing the workaround everything seems to work well. After I had a second look I recognized that the edit/delete buttons for the downloads are gone ( ?action=tpmod;dl=admincat* ). Also the aproval column. In the sections view the buttons are visable and useable ( action=tpmod;dl=admin ). Can anyone who implemented the workaround have a look in the backend if everything is ok there. Thx

There is a error message also:

Apply Filter: Only show the error messages of this URL
http://xxxxxxxxxxxxxxxxxxx/index.php?action=tpmod;dl=admincat2
Apply Filter: Only show the errors with the same message
2: mysql_real_escape_string() expects parameter 1 to be string, array given
Apply Filter: Only show the errors from this file
Datei: /var/www/vhosts/xxxxxxxxx.de/subdomains/forum/httpdocs/Sources/Subs-Db-mysql.php
Zeile: 163

Nolt

I don't think so, I just added this fix to two my live servers and 3 test sites and I see [Edit] and [Delete] buttons in DL section, also they working well.

league

Where do i edit that code? which file?  i had that happen today, it worked last night but this morning it didnt, got to love change of the year  ::)

IchBin

Quote from: league on January 06, 2012, 02:27:02 PM
Where do i edit that code? which file?  i had that happen today, it worked last night but this morning it didnt, got to love change of the year  ::)

league,
The code is in the Sources/TPdlmanager.php file in a couple of spots. Just search for $week and you'll find all of them where you need to make the change I posted.

iceman11a

I wish I would have fount this before I posted about it. How ever what file do I have to edit in order to fix this

iceman11a

I wish I would have fount this before I posted about it. Thanks Guys that seems to have worked.


This website is proudly hosted on Crocweb Cloud Website Hosting.