I am getting this error on most pages:

Notice: Undefined offset: 1 in _resp_img_replace() (line 376 of F:\Web\theme\upload\sites\default\modules\resp_img\resp_img.module).

Comments

Perry.Harward’s picture

StatusFileSize
new17.01 KB

I am getting this same error most pages as well..

Here is the page I am getting this on. as an attachment:

jelle_s’s picture

Looking at the line the error occurs, the only thing I can think of is that you either have an img tag without a src attribute, or an img tag where the value of the src attribute is encapsulated in single quotes in stead of double quotes. Can you check if that's the case?

jelle_s’s picture

Status: Active » Postponed (maintainer needs more info)
bumpytruck’s picture

I was having a similar issue after enabling a new module on my site to handle Twitter 'things' (http://drupal.org/project/twitter), each instance of an image was returning this error; I checked the img tag as per your comment and I did discover that the src attribute was doing a funky double quote dance.

src=""path""

So I modified some of the code, tested, and ran some debug checks; however it didn't stop the error message.

Eventually I decided to disable, uninstall, and reinstall resp_img to see if there was some unseen hang-up; nope, but while toggling settings and running tests I noticed that disabling resp_img for blocks (resp_img_block_enabled) caused the error to cease.

I'm still looking into why this is the case, but with less fervor as it is no longer reporting the error; I am not totally convinced it is resp_img's fault since it was running fine before the latest module addition.
Hope this helps anyone out there with this error.

arknoll’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1011 bytes

Attached is a patch that removes the error by not attempting to change images when the src is not found by preg_match('/src=("[^"]*")/i', $img, $src);

attiks’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Old issue, I think you better update to the picture module

lollypopgr’s picture

Well I definitely have the latest version and I also get this error.
I changed the offending line to $src = sizeof($src)>0 ? $src[1] : ""; but I am sure there is a better way to fix this.