Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0

Conflicts:
	htdocs/core/lib/json.lib.php
This commit is contained in:
Laurent Destailleur
2017-09-14 11:49:02 +02:00
2 changed files with 2 additions and 3 deletions

View File

@@ -42,12 +42,11 @@ if (! function_exists('json_encode'))
*
* @param mixed $elements PHP Object to json encode
* @return string Json encoded string
* @deprecated PHP >= 5.3 supports native json_encode
* @see json_encode()
*/
function dol_json_encode($elements)
{
dol_syslog('dol_json_encode() is deprecated. Please update your code to use native json_encode().', LOG_WARNING);
dol_syslog("For better permorfance, enable the native json in your PHP", LOG_WARNING);
$num=0;
if (is_object($elements)) // Count number of properties for an object

View File

@@ -580,7 +580,7 @@ class TCPDI extends FPDF_TPL {
* close all files opened by parsers
*/
function _closeParsers() {
if ($this->state > 2 && count($this->parsers) > 0) {
if ($this->state > 2 && is_array($this->parsers) && count($this->parsers) > 0) {
$this->cleanUp();
return true;
}