Skip to content

Commit

Permalink
fix captcha pointing to the wrong theme path
Browse files Browse the repository at this point in the history
  • Loading branch information
zegenie committed Dec 27, 2016
1 parent b974206 commit 285b253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/modules/main/controllers/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -4679,11 +4679,11 @@ public function runCaptcha(framework\Request $request)
$this->getResponse()->setContentType('image/png');
$this->getResponse()->setDecoration(\thebuggenie\core\framework\Response::DECORATE_NONE);
$chain = str_split($_SESSION['activation_number'], 1);
$size = getimagesize(THEBUGGENIE_PATH . DS . 'themes' . DS . framework\Settings::getThemeName() . DS . 'numbers/0.png');
$size = getimagesize(THEBUGGENIE_PATH . DS . 'themes' . DS . framework\Settings::getThemeName() . DS . 'images' . DS . 'numbers' . DS . '0.png');
$captcha = imagecreatetruecolor($size[0] * sizeof($chain), $size[1]);
foreach ($chain as $n => $number)
{
$pic = imagecreatefrompng(THEBUGGENIE_PATH . DS . 'themes' . DS . framework\Settings::getThemeName() . DS . "numbers/{$number}.png");
$pic = imagecreatefrompng(THEBUGGENIE_PATH . DS . 'themes' . DS . framework\Settings::getThemeName() . DS . 'images' . DS . 'numbers' . DS . "{$number}.png");
imagecopymerge($captcha, $pic, $size[0] * $n, 0, 0, 0, imagesx($pic), imagesy($pic), 100);
imagedestroy($pic);
}
Expand Down

0 comments on commit 285b253

Please sign in to comment.