ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: TE on April 19, 2016, 03:47:50 am

Title: [1.1] White Page manage attachments
Post by: TE on April 19, 2016, 03:47:50 am
index.php?action=admin;area=manageattachments;sa=attachpaths; gives a white page, at least on this site..
Related Error log:
Notice: The parent constructor was not called: the object is in an invalid state
Code: [Select]
File: .../sources/subs/ManageAttachments.subs.php
Line: 1278
Title: Re: [1.1] White Page manage attachments
Post by: emanuele on April 19, 2016, 04:17:13 am
PHP bug: https://bugs.php.net/bug.php?id=55701
But I guess we have to have that one fixed...

Not sure how this call is any different from the several others, except it may hit an empty directory... but addons would do as well... :-\
Title: Re: [1.1] White Page manage attachments
Post by: TE on April 19, 2016, 04:55:41 am
ah ok, found a solution here http://stackoverflow.com/questions/22320103/globiterator-no-file-found-php-5-3-7-error
I haven't tested yet but it should work:
 
Code: [Select]
	$num_files = $glob->count();
replace with:
Code: [Select]
	$num_files = count(iterator_to_array($glob));

I'd send a PR but my DEV client is currently badly broken.. I'll try to rebuild the box during the next days, it's about time for a comeback :)
Title: Re: [1.1] White Page manage attachments
Post by: emanuele on April 19, 2016, 06:03:04 am
No problem I have a series of commits pending (I tend to commit, upload the file here, wait to push), I'll add that too and upload the file this afternoon. ;D
Title: Re: [1.1] White Page manage attachments
Post by: emanuele on April 19, 2016, 10:52:34 am
da08aa00a39507909e09305c1d2f7e085980ce6e
Title: Re: [1.1] White Page manage attachments
Post by: meetdilip on April 19, 2016, 10:55:26 am
Quote from: emanuele – da08aa00a39507909e09305c1d2f7e085980ce6e

What's this ?
Title: Re: [1.1] White Page manage attachments
Post by: emanuele on April 19, 2016, 10:59:35 am
The commit hash. (i.e. A unique hash that identifies a particular commit, in that case the commit that fixed the issue. No link because it's still on my computer, but https://github.com/elkarte/Elkarte/commit/da08aa00a39507909e09305c1d2f7e085980ce6e will show it... leter. :P)