View Issue Details

IDProjectCategoryView StatusLast Update
2746Composrcorepublic2016-07-30 16:28
ReporterPDStig Assigned ToChris Graham  
PriorityhighSeverityminor 
Status resolvedResolutionfixed 
Summary2746: Sometimes block loading results in a MySQL query error
DescriptionUnfortunately a query has failed [UPDATE alfa_temp_block_permissions SET p_time=1469829230 WHERE (p_session_id=3514966991453 AND p_block_constraints='as_guest=0,attach_to_url_filter=0,block=main_news,blogs=0,defer=1,fallback_archive=6,fallback_full=3,member_based=0,multiplier=0\\.5,no_links=0,optimise=0,pagination=0,param=30,render_if_empty=0,select=8,show_in_full=0,start=0,title=Latest News,zone=_SEARCH') LIMIT 1] [<strong>Truncated incorrect DOUBLE value: '2f72590e4f149'</strong>] (version: 10 RC14, PHP version: 7.0.9, URL: /) @ https://wwsu1069.org/
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2016-07-30 16:17

administrator   ~4200

Ok, I've worked this out.

It happens when the session ID is numeric. PHP changes numeric array indices into integers, so we get it back with an integer and it breaks a query.

This is the chance of it happening:
(10/16)^13*100=0.222%

PDStig

2016-07-30 16:23

administrator   ~4201

Oh wow, so I must have gotten lucky XD

Chris Graham

2016-07-30 16:24

administrator   ~4202

Fixed.

sources/users.php in my latest commit

PDStig

2016-07-30 16:27

administrator   ~4203

Thanks. Also, is it weird that if a block causes an error, it loads up global_html_wrap again to display the error (and you then get two headers/pages in one)?

Chris Graham

2016-07-30 16:28

administrator   ~4204

Yeah, it can't track output progress really, not really got a solution to that one.

Issue History

Date Modified Username Field Change
2016-07-29 21:55 PDStig New Issue
2016-07-30 16:17 Chris Graham Note Added: 0004200
2016-07-30 16:23 PDStig Note Added: 0004201
2016-07-30 16:24 Chris Graham Note Added: 0004202
2016-07-30 16:24 Chris Graham Status Not Assigned => Resolved
2016-07-30 16:24 Chris Graham Resolution open => fixed
2016-07-30 16:24 Chris Graham Assigned To => Chris Graham
2016-07-30 16:27 PDStig Note Added: 0004203
2016-07-30 16:28 Chris Graham Note Added: 0004204