I’ve fixed the problem for myself. I’ve changed the $res variable on line 252.
I’ve changed the following code:
$res = wp_get_attachment_metadata($dbres[0]->post_id);
to:
$res = array(wp_get_attachment_metadata($dbres[0]->post_id));
Now it works for me!