Hacking Live Preview
My PHP error logs are filling up with errors like this one:
[05-May-2007 06:11:56] PHP Notice: Undefined variable: livePreviewDivAdded in /var/www/thecafes/wp-content/plugins/live-comment-preview.php on line 24
so I decided to see if I could fix it. I think the problem is this line:
$livePreviewDivAdded == false;
I’m using this post to test that.
May 5th, 2007 at 5:16 AM
Let’s see if the live preview still works. Yep it does.
May 5th, 2007 at 5:17 AM
Now let’s see if I’m still getting the error message. Hmm, looks like I am. Maybe that’s not it?
May 5th, 2007 at 5:20 AM
What if I just comment out that line? Live preview still seems to work, and I’m not seeing any error messages. I wonder why? Don’t you love experimental programming?
May 5th, 2007 at 5:31 AM
Oh wait. It’s this bug again. The first fix (
==
to=
) did repair the problem here. The error messages I was getting were from The Cafes, not Mokka mit Schlag. I need to update both version of the plugin. DRY strikes again.