Add support for PHP 8.0
This commit is contained in:
commit
615e6d223f
2 changed files with 418 additions and 422 deletions
|
@ -256,7 +256,7 @@ if (badQuery()) {
|
|||
require "phpqrcode.php";
|
||||
|
||||
$cheminImage = "temp/" . generateRandomString($fileNameLenght) . ".png";
|
||||
QRcode::png($_GET['txt'], $cheminImage, $_GET['redondancy'], $_GET['size'], $_GET['margin'], false, hexdec($_GET['bgColor']), hexdec($_GET['mainColor']));
|
||||
QRcode::png($_GET['txt'], $cheminImage, $_GET['redondancy'], $_GET['size'], $_GET['margin'], false, hexdec(substr($_GET['bgColor'], -6)), hexdec(substr($_GET['mainColor'], -6)));
|
||||
?>
|
||||
<div class="centered">
|
||||
<a href="<?php echo $cheminImage; ?>" class="button" download="<?php echo htmlspecialchars($_GET['txt']); ?>.png"><?= $loc['button_download'] ?></a>
|
||||
|
|
|
@ -952,7 +952,7 @@
|
|||
class QRimage {
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color)
|
||||
public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000)
|
||||
{
|
||||
$image = self::image($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color);
|
||||
|
||||
|
@ -3546,7 +3546,7 @@
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color)
|
||||
public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000)
|
||||
{
|
||||
$vect = self::vectSVG($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color);
|
||||
|
||||
|
@ -3619,7 +3619,3 @@
|
|||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue