From cb155a7e5d4797cc21602de5205af67230e89a31 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Fri, 10 May 2013 14:36:46 +0000 Subject: [PATCH] - Fix build PR: 176914 Submitted by: Gasol Wu Approved by: Ports Fury --- devel/pear-Net_Gearman/Makefile | 1 + .../files/patch-Net__Gearman__Client.php | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 devel/pear-Net_Gearman/files/patch-Net__Gearman__Client.php diff --git a/devel/pear-Net_Gearman/Makefile b/devel/pear-Net_Gearman/Makefile index f10a22b46f69..dc868e6e4544 100644 --- a/devel/pear-Net_Gearman/Makefile +++ b/devel/pear-Net_Gearman/Makefile @@ -3,6 +3,7 @@ PORTNAME= Net_Gearman PORTVERSION= 0.2.3 +PORTREVISION= 1 CATEGORIES= devel pear MAINTAINER= gslin@gslin.org diff --git a/devel/pear-Net_Gearman/files/patch-Net__Gearman__Client.php b/devel/pear-Net_Gearman/files/patch-Net__Gearman__Client.php new file mode 100644 index 000000000000..284346500a93 --- /dev/null +++ b/devel/pear-Net_Gearman/files/patch-Net__Gearman__Client.php @@ -0,0 +1,26 @@ +--- ./Net/Gearman/Client.php.orig 2013-03-13 17:50:59.000000000 +0800 ++++ ./Net/Gearman/Client.php 2013-03-13 17:51:18.000000000 +0800 +@@ -166,11 +166,11 @@ + $s = $this->getConnection(); + Net_Gearman_Connection::send($s, $type, $params); + +- if (!is_array(Net_Gearman_Connection::$waiting[$s])) { +- Net_Gearman_Connection::$waiting[$s] = array(); ++ if (!is_array(Net_Gearman_Connection::$waiting[(int) $s])) { ++ Net_Gearman_Connection::$waiting[(int) $s] = array(); + } + +- array_push(Net_Gearman_Connection::$waiting[$s], $task); ++ array_push(Net_Gearman_Connection::$waiting[(int) $s], $task); + } + + /** +@@ -244,7 +244,7 @@ + $task->fail(); + break; + case 'job_created': +- $task = array_shift(Net_Gearman_Connection::$waiting[$s]); ++ $task = array_shift(Net_Gearman_Connection::$waiting[(int) $s]); + $task->handle = $resp['data']['handle']; + if ($task->type == Net_Gearman_Task::JOB_BACKGROUND) { + $task->finished = true;