prevent ```Undefined variable: captchaObjectType```
authorJoshua Rüsweg <josh@bastelstu.be>
Tue, 21 Oct 2014 12:59:54 +0000 (14:59 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Tue, 21 Oct 2014 12:59:54 +0000 (14:59 +0200)
If you disable the captcha, you get when creating a commentary the error message: Undefined variable: captchaObjectType on line 610 and 614. This pull request fixes the bug.

wcfsetup/install/files/lib/data/comment/CommentAction.class.php

index b6024ec316361f35098390676379377b3e02e848..9f36418847edda4879142817c4ca9a0484429de9 100644 (file)
@@ -595,6 +595,8 @@ class CommentAction extends AbstractDatabaseObjectAction {
         * @return      array
         */
        public function getGuestDialog() {
+               $captchaObjectType = null; 
+               
                if (CAPTCHA_TYPE) {
                        $captchaObjectType = CaptchaHandler::getInstance()->getObjectTypeByName(CAPTCHA_TYPE);
                        if ($captchaObjectType === null) {