Skip to content

Commit

Permalink
removed the $ in $this->$captchadir
Browse files Browse the repository at this point in the history
  • Loading branch information
romanseidl committed Apr 13, 2015
1 parent 3fc6773 commit 08e0978
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions DiceCaptcha/DiceCaptcha.module
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ class DiceCaptcha extends WireData implements Module, ConfigurableModule

public function init()
{
$this->$captchadir = $this->config->paths->assets . self::CAPTCHA_DIR;
if (!is_dir($this->$captchadir)) {
wireMkdir($this->$captchadir);
$this->captchadir = $this->config->paths->assets . self::CAPTCHA_DIR;
if (!is_dir($this->captchadir)) {
wireMkdir($this->captchadir);
} else {
//delete old files
$files = glob($this->$captchadir . "/*");
$files = glob($this->captchadir . "/*");
$now = time();
foreach ($files as $file)
if (is_file($file))
Expand Down Expand Up @@ -90,7 +90,7 @@ class DiceCaptcha extends WireData implements Module, ConfigurableModule
$current_x = $current_x + $dice_size;
}

$filename = tempnam($this->$captchadir, "c");
$filename = tempnam($this->captchadir, "c");
unlink($filename);
$filename .= ".jpg";
$captcha = imagejpeg($canvas_image, $filename);
Expand Down Expand Up @@ -145,4 +145,3 @@ class DiceCaptcha extends WireData implements Module, ConfigurableModule
return $inputfields;
}
}

0 comments on commit 08e0978

Please sign in to comment.