diff --git a/ChangeLog b/ChangeLog index de0346f68..49aa50623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ $Id$ $HeadURL$ 2007-02-14 Marc Delisle + * libraries/common.lib.php: white page after uploading a 700 Kio BLOB * add a warning on main page if mcrypt can't be loaded (bug 1658160) 2007-02-12 Sebastian Mendel diff --git a/libraries/common.lib.php b/libraries/common.lib.php index f759e8fe1..08a65fb33 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1456,7 +1456,15 @@ if (typeof(window.parent) != 'undefined' echo '
' . "\n"; echo ' ' . $GLOBALS['strSQLQuery'] . ':'; echo '
'; - echo ' ' . $query_base; + // when uploading a 700 Kio binary file into a LONGBLOB, + // I get a white page, strlen($query_base) is 2 x 700 Kio + // so put a hard limit here (let's say 1000) + $max_characters = 1000; + if (strlen($query_base) > $max_characters) { + echo ' ' . substr($query_base,0,$max_characters) . '[...]'; + } else { + echo ' ' . $query_base; + } //Clean up the end of the PHP if (!empty($GLOBALS['show_as_php'])) {