Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It could be that it's not a bug in image.module itself, but there is an easy fix.
On line 635 the var $label should be just text, eg 'thumbnail'. But in some situations, it's an array Array( [0] => 'thumbnail' ).
By putting this on line 635 the issue can be solved: if(is_array($label)) $label = $label[0];
-----
Some background info:
The page is a view using image_gallery module. The field is 'Image gallery: Latest image'.