Keith Devens .com |
Saturday, March 20, 2010 | ![]() |
| And certainly both Horses were doing, if not all they could, all they thought they could, which is not quite... – C.S. Lewis (The Horse and His Boy, ch 10) | ||
|
| ← New URL scheme working | Caching with Smarty → |

ideoplastos (http://www.ideoplastos.net) wrote:
ideoplastos (http://www.ideoplastos.net) wrote:
Whoops?:Notice: Undefined index: preview in /home/keith/kbdcms/Modules/weblog_module.php on line 182
Notice: Undefined index: email in /home/keith/kbdcms/Models/weblog_model.php on line 80
Keith (http://www.keithdevens.com/) wrote:
Thanks. I severly broke my site for a while early this morning. I was working on my KISML parser (shhhh) to add a feature I wanted, but I was too lazy to copy the library so I wouldn't have to work on my live site, so things broke for a while.
Furthermore, I turned on all PHP notices from my .htaccess file, so no longer can I say things like:
$foo = $arr['bar'];
I have to say:
$foo = (isset($arr['bar']) ? $arr['bar'] : NULL)
Every fucking time so that PHP doesn't give me notices. That's why you were getting the warning. Thanks for letting me know.
Keith (http://www.keithdevens.com/) wrote:
In fact, to fix this error, I had to turn a line from
$c_email = addslashes($comment["email"]);
into:
$c_email = isset($comment['email']) ? addslashes($comment["email"]) : NULL;
How annoying is that?
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.11s.
(Used 8 db queries)
Cool!