From ea09c0f82b8d6048657719884683666b661c6fd6 Mon Sep 17 00:00:00 2001 From: corpsee Date: Sun, 3 May 2015 00:44:23 +0600 Subject: [PATCH] Added sprintf to the forming shields.io request --- PHPCI/Controller/BuildStatusController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PHPCI/Controller/BuildStatusController.php b/PHPCI/Controller/BuildStatusController.php index b23d3744..9505e184 100644 --- a/PHPCI/Controller/BuildStatusController.php +++ b/PHPCI/Controller/BuildStatusController.php @@ -87,12 +87,12 @@ class BuildStatusController extends \PHPCI\Controller } $color = ($status == 'passing') ? 'green' : 'red'; - $image = file_get_contents( - 'http://img.shields.io/badge/' . - $label . '-' . - $status . '-' . - $color . '.svg?style=' . $style - ); + $image = file_get_contents(sprintf('http://img.shields.io/badge/%s-%s-%s.svg?style=%s', + $label, + $status, + $color, + $style + )); $this->response->disableLayout(); $this->response->setHeader('Content-Type', 'image/svg+xml');