UPDATES EasyBlog 5.4.8 Released. Bugfixes and more 🐛


Error processing images in AMP

I am seeing the following warnings:

Notice: Undefined offset: 1 in .../administrator/components/com_easyblog/includes/image/image.php on line 520

preg_match('/src="([^"]+)"/', $image, $src);

$url = $src[1];

In many cases, this preg_match returns no array, so $src is empty. Attempting to index into [1] thus fails. Here's the tag on an image that's not being converted to amp-img. It is found in the outer regex, but not the inner. Could it be that the img tag has a class before the src?

<img class='calloutplanet' src='https://www.retrograde.today/images/planetsretro/mars.png' alt='Mars' />

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Your time
Stack Ideas HQ
Support is

It is currently a weekend from where we are at. Some answers may already be available on our documentation

Rest assured that we will get back to your posts as soon as the week starts!

Buy Us Coffee

Are you happy with our support and would like to buy us a cup of coffee?

Enjoy the Coffee!
Service via PayPal
Subscribe for product updates & promotions