Previous Thread
Next Thread
Print Thread
Hop To
[FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php #262715 05/24/2019 2:47 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Line#: 161
SQL Error: Incorrect integer value: '' for column 'SUBSCRIPTION_END_DATE' at row 1
SQL Error #: 1366
Query: update ubbt_SUBSCRIPTION_DATA set SUBSCRIPTION_END_DATE = '' where CUSTOM_ID = '3274be4f0f4d1acf32080bd353e9d5e6'


BUG is... ???
$newtime = strtotime("{$ubbt_lang['MONTH' . $month]} $day $year");

FIX ???
$newtime = strtotime("$day-$month-$year");

Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262718 05/25/2019 4:19 PM
Joined: Dec 2003
Posts: 5,946
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,946
Looks to me you don't like the default date format. mm/dd/yyyy
and want dd/mm/yyyy that should be done in the control panel.
Not in code.
that is display general-date&time
I did not review the file though.

Last edited by Ruben; 05/25/2019 4:24 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262719 05/25/2019 9:49 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
The problem is that this $ubbt_lang should not be used as a variable because this is a modifiable language variable.

Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262723 05/27/2019 1:29 AM
Joined: Apr 2004
Posts: 1,514
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,514
strtotime (PHP 4, PHP 5, PHP 7)
strtotime — Parse about any English textual datetime description into a Unix timestamp
https://www.php.net/manual/en/function.strtotime.php

The strtotime() function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC),


CURRENT CODE
strtotime("{$ubbt_lang['MONTH' . $month]} $day $year");

$month is the dropdown menu value that gets translated in to the language string, as $ubbt_lang['MONTH_'] where the dropdown menu has values of 1 through 12. each representing a month

For example,
$ubbt_lang['MONTH5'] = "May";

This parses as ENGLISH format. such as:
May 26 2019


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262725 05/27/2019 1:02 PM
Joined: Jul 2006
Posts: 99
Philipp Offline
Journeyman
Offline
Journeyman
Joined: Jul 2006
Posts: 99
BlackMale is right. The problem is that this function will break as soon you translate the language file to a different language. The suggested fix will do the trick after any English date format including strtotime("$day-$month-$year"); (European) or strtotime("$month/$day/$year"); (US) will be converted into a Unix timestamp.

Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262726 05/27/2019 1:18 PM
Joined: Apr 2004
Posts: 1,514
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,514
There are a lot of things in the core code that can be rewritten and could be improved upon. Obviously those things are already happening, but they are happening with only as much time as I am able to put in to this product, outside of family and work.


@ BlackMale -
Submissions are helpful when they include narrative.

Without narrative, it because a unpleasant guessing game of "guess what color that non-descriptive thing is." And as said times before, this is especially true when the software has had many developers in the past 20 years, and not everyone has worked on all aspects of the whole program.

Not to be mistaken, your reports are helpful. But they are often difficult to understand what you're attempting to demonstrate.

--

Please at least follow some of the expected basics when reporting a bug:
** ID/name: Keep it brief and use correct terms. A best practice is to include the name of the feature where you found an issue. A good example could be 'CART - Unable to add new item to my cart'.
** Description/summary: If you feel the name is not sufficient, explain the bug in a few words. Share it in easy-to-understand language. Keep in mind that your description might be used to search in your bug tracking application, so make sure to use the right words.
** Environment: Depending on your browser, operating system, zoom level and screen size, websites may behave differently from one environment to another. Make sure your developers know your technical environment.
** Source URL: Make it easy for your developers spot the problem by including the URL of the page where you found the bug. Big time saver!
** Visual proof: A picture is worth a thousand words. Although it might not be enough, a visual element like a screenshot or a video will help your developers understand the problem better and faster.
** Steps to reproduce: A screenshot is a proof that you had a problem, but keep in mind that your developer might not be able to reproduce the bug. Make sure to describe, with as much detail as possible, the steps you took before you encountered the bug.
** Expected vs. actual results: Explain what results you expected - be as specific as possible. Just saying "the app doesn’t work as expected" is not useful. It's also helpful to describe what you actually experienced.
** Optional: You can also include extra information such as the severity (critical, major, minor, trivial, enhancement), priority (high, medium, low), name of the reporter, person assigned or a due date.

This example was duplicated from https://marker.io/blog/tag/workflows/

Last edited by isaac; 05/27/2019 1:25 PM. Reason: clarity

Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262729 05/29/2019 3:55 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Due to my poor English, I can only use the simple problem when I find the problem.

Also use google translation

I hope you understand, thank you for teaching.

Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262745 05/31/2019 10:35 PM
Joined: Apr 2004
Posts: 1,514
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,514
Thank you BlackMale for reporting this error, and Philipp for further explanation.

It has been fixed for UBB.threads 7.7.2

To avoid potential errors, the widely accepted date format of "YYYY-MM-DD" will be used. The $day and $month values coming from edit_user_sub.php will no longer depend on the language strings, and are now converted in to two digits going forward. (example: $day = sprintf('%02d', $day)) for passing to the strtotime() function which parses that format into the Unix timestamp.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: isaac] #262876 06/30/2019 5:46 PM
Joined: Jun 2006
Posts: 626
Daryl Fawcett Online Confused
Addict
Online Confused
Addict
Joined: Jun 2006
Posts: 626
Originally Posted by isaac
Thank you BlackMale for reporting this error, and Philipp for further explanation.

It has been fixed for UBB.threads 7.7.2

To avoid potential errors, the widely accepted date format of "YYYY-MM-DD" will be used. The $day and $month values coming from edit_user_sub.php will no longer depend on the language strings, and are now converted in to two digits going forward. (example: $day = sprintf('%02d', $day)) for passing to the strtotime() function which parses that format into the Unix timestamp.

Is there a need for me to fix this for 7.7.1?????

Re: [FIXED for 7.7.2] 7.7.1 \admin\do_subchange.php [Re: BlackMale] #262877 06/30/2019 6:02 PM
Joined: Apr 2004
Posts: 1,514
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,514
No.

1) its not show-stopping.
2) it has no affect on forums using English as their Control Panel language.
3) An update will appear in the public release following 7.7.1.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com

Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Horizontal Image Attachment
by ECNet - 09/11/2019 12:17 PM
user profile, after I click Update nothing happens
by PianoWorld - 09/10/2019 12:38 PM
Inline Image Embeds
by ECNet - 09/03/2019 2:38 PM
Paid Subscriptions - Needs More Incentive
by M4TT - 08/25/2019 10:06 PM
Who's Online Now
2 registered members (isaac, Daryl Fawcett), 50 guests, and 374 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.3