]> git.nbdom.net Git - nb.git/commitdiff
lib/php/out/png.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 Dec 2017 19:40:56 +0000 (19:40 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 Dec 2017 19:40:56 +0000 (19:40 +0000)
lib/php/out.php
lib/php/out/jpg.php
lib/php/out/png.php

index 3bcaf3089d457b14d5eaf0711c7be1af9938d881..b8e06c21f9f82e66cf03569c845649c1167a2771 100644 (file)
@@ -279,6 +279,7 @@ Class Out extends Nb {
       $count++;
 
       self::row($conf,$row);
+                       if (isset($conf['limit']) and $count > $conf['limit']) break;
 
     }
 
index 5f4d6a218d4c586fb1bb0653aab530bbda2aa9a5..716dfa206930d59535cb4be0fb4a2429827ce8c4 100644 (file)
@@ -14,6 +14,8 @@ return [
                if (!empty($o['_jpg'])) return;
                $o['_jpg'] = true;
     foreach ($row as $k=>$v) {
+                       if (!is_scalar($v) or !self::is_binary($v)) continue;
+                       $o['limit'] = 0;
       $img = imagecreatefromstring($v);
 
                        if ($o['w'] and $o['h']) {
index bf9bd7b0e9a6aab36895e47ec0807f66a5a4f6ff..64f8c85aeb63e1d645dc5bfb18abb59ba40fa877 100644 (file)
@@ -14,6 +14,8 @@ return [
                if (!empty($o['_png'])) return;
                $o['_png'] = true;
     foreach ($row as $k=>$v) {
+                       if (!is_scalar($v) or !self::is_binary($v)) continue;
+                       $o['limit'] = 0;
       $img = imagecreatefromstring($v);
 
                        if ($o['w'] and $o['h']) {