IMCE just hangs when opening due to infinite loop in dir_opendir
On line 909:
if (!isset($response->body->IsTruncated) || $response->body->IsTruncated === 'false') {
$truncated = FALSE;
}
This never gets evaluated to true (so $truncated gets set to FALSE). The fix is just to change to == instead of ===
if (!isset($response->body->IsTruncated) || $response->body->IsTruncated == 'false') {
I believe the issue is that this is not a string but a CFSimpleXML object and either you need == or to cast it to a string before comparing with ===.
Attached is a patch to make the change above.
Comment | File | Size | Author |
---|---|---|---|
opendir_istruncated_infinite_loop.patch | 725 bytes | mhenning |
Comments
Comment #1
AliMartin CreditAttribution: AliMartin commentedLife saver, many thanks for supplying this patch :)
Comment #2
vanvemdenThe patch works, and thanks!
Comment #3
justafishFixed in #2222005: Infinite loop in open directory handler | AmazonS3StreamWrapper::dir_opendir