Camen Design Forum

Uninitialized string offset

Martijn

Oh, interesting!

The code looks for all `href`, `src`, and `content` HTML attributes in the template and then checks their first character. The notice being thrown means there was no first character (ie. it is empty).

Is this on the unchanged template?

Two possible fixes that immediately come to mind:

1. Find where any of those attributes are empty in the template and add some content to them.
2. Expand the `if` on line 66 to make sure the value isn’t empty (something like `strlen($node->nodeValue) > 0` would do the trick) before checking the first character.

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn