Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-20 10:10:52 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-20 10:10:52 +0300
commit359ecda5bf855565845b81898eb7c6e19e6da2ad (patch)
tree8d0466de8864ebb303a68d32368ef72e27dfc718 /libs/sparkline
parent687fb8080f0eced882f7f6dfcdd34c1a1fc26bad (diff)
Diffstat (limited to 'libs/sparkline')
-rw-r--r--libs/sparkline/lib/Sparkline.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/sparkline/lib/Sparkline.php b/libs/sparkline/lib/Sparkline.php
index 272cb9626b..f2206c56ec 100644
--- a/libs/sparkline/lib/Sparkline.php
+++ b/libs/sparkline/lib/Sparkline.php
@@ -192,10 +192,19 @@ class Sparkline extends Object {
//
function CreateImageHandle($x, $y) {
$this->Debug("Sparkline :: CreateImageHandle($x, $y)", DEBUG_CALLS);
-
- $handle = imagecreatetruecolor($x, $y);
- if (!is_resource($handle)) {
+ if(function_exists('imagecreatetruecolor'))
+ {
+ $handle = imagecreatetruecolor($x, $y);
+ }
+ elseif(function_exists('imagecreate'))
+ {
$handle = imagecreate($x, $y);
+ }
+ else
+ {
+ echo "You need at least imagecreate()";exit;
+ }
+ if (!is_resource($handle)) {
$this->Debug('imagecreatetruecolor unavailable', DEBUG_WARNING);
}