From 2388ad046f442067570be502a9556dd797762cb9 Mon Sep 17 00:00:00 2001 From: toplan Date: Mon, 14 Dec 2015 13:52:41 +0800 Subject: [PATCH] php5.4 not support boolval() function --- README.md | 2 +- composer.json | 2 +- {test => demo}/demo.php | 0 {test => demo}/demo2.php | 0 src/TaskBalancer/Driver.php | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename {test => demo}/demo.php (100%) rename {test => demo}/demo2.php (100%) diff --git a/README.md b/README.md index 2247260..97f51fb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ lightweight and powerful task load balancing for php # Install ```php - composer require 'toplan/task-balancer:~0.2.2' + composer require 'toplan/task-balancer:~0.2.3' ``` # Usage diff --git a/composer.json b/composer.json index 3664f1d..f5a1c98 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "toplan/task-balancer", "description": "lightweight and powerful task load balancing for php (like the nginx load balancing)", "license": "MIT", - "version": "0.2.2", + "version": "0.2.3", "keywords": ["task", "balance", "load balancing", "balancer"], "authors": [ { diff --git a/test/demo.php b/demo/demo.php similarity index 100% rename from test/demo.php rename to demo/demo.php diff --git a/test/demo2.php b/demo/demo2.php similarity index 100% rename from test/demo2.php rename to demo/demo2.php diff --git a/src/TaskBalancer/Driver.php b/src/TaskBalancer/Driver.php index 4ee1873..e887fe8 100644 --- a/src/TaskBalancer/Driver.php +++ b/src/TaskBalancer/Driver.php @@ -71,7 +71,7 @@ public function __construct(Task $task, $name, $weight = 1, $isBackUp = false, \ $this->task = $task; $this->name = $name; $this->weight = intval($weight); - $this->isBackUp = boolval($isBackUp); + $this->isBackUp = !!$isBackUp; $this->work = $work; }