Camen Design Forum

Uninitialized string offset

Martijn

Was it your modifications to the theme that triggered the error? I’d love to get to the bottom of this.

Sorry, my second possible fix just showed the minimal code that would need to be added, assuming whoever was going to add it knew their way around PHP. The line should probably be something like this (note: not tested):

%
foreach ($template->query ('//*/@href, //*/@src, //*/@content') as $node) if (strlen($node->nodeValue) > 0 && $node->nodeValue[0] == '/')
%

Inside the if statement, it should first check the length of the nodeValue before comparing the first character to `/`.

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