diff --git a/lib/PHPQRCode/QRcode.php b/lib/PHPQRCode/QRcode.php
index <HASH>..<HASH> 100644
--- a/lib/PHPQRCode/QRcode.php
+++ b/lib/PHPQRCode/QRcode.php
@@ -139,7 +139,7 @@ class QRcode {
     public static function png($text, $outfile = false, $level = Constants::QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false)
     {
         $enc = QRencode::factory($level, $size, $margin);
-        return $enc->encodePNG($text, $outfile, $saveandprint=false);
+        return $enc->encodePNG($text, $outfile, $saveandprint);
     }
 
     //----------------------------------------------------------------------
PNG render method's $saveandprint param was forced to false when passed to QRencode