1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

- Fix build

PR:		176914
Submitted by:	Gasol Wu <gasol.wu@gmail.com>
Approved by:	Ports Fury
This commit is contained in:
Martin Wilke 2013-05-10 14:36:46 +00:00
parent 054cd56e4a
commit cb155a7e5d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=317810
2 changed files with 27 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= Net_Gearman
PORTVERSION= 0.2.3
PORTREVISION= 1
CATEGORIES= devel pear
MAINTAINER= gslin@gslin.org

View File

@ -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;