Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Graphs incomplete with mbstring #3397

Closed
centreon opened this issue Oct 24, 2014 · 1 comment
Closed

Graphs incomplete with mbstring #3397

centreon opened this issue Oct 24, 2014 · 1 comment

Comments

@centreon
Copy link
Collaborator


Author Name: Francesco Usseglio Gaudi (Francesco Usseglio Gaudi)
Original Redmine Issue: 5908, https://forge.centreon.com/issues/5908
Original Date: 2014-10-24


Hi,
I had incomplete graphs (the bottom line was missing).
I have checked the class centreonGraph.class.php in the displayImageFlow() function.
At line 1288 the setHeaders use strlen but this function returns bad image size (shorter).
I have changed the strlen to mb_strlen($str,'8bit') and now i have correct image graphs size.

--- class/centreonGraph.class.php   2014-10-23 16:10:04.000000000 +0200
+++ class/centreonGraph.class.php.orig  2014-10-23 16:10:42.000000000 +0200
@@ -1285,9 +1285,8 @@
                 $return_value = proc_close($process);

                 /* Force no compress for image */
-                $this->setHeaders(false, mb_strlen($str,'8bit'));
+                $this->setHeaders(false, strlen($str));
                 print $str;
             }
         } else {
             return $commandLine;



@Tpo76
Copy link
Contributor

Tpo76 commented Aug 11, 2015

OK

@leoncx leoncx closed this as completed Aug 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants