Permalink
Browse files

Set autoload to false for 'class_exists' calls. Currently it is not s…

…et, so the default is true which causes any defined '__autoload' function in the included app to be called.
  • Loading branch information...
humancopy committed May 18, 2011
1 parent bf29c5e commit cd3b0cca0eb4f9be6d5f4629b65679834ae59d3d
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/Resque/Job.php
  2. +1 −1 lib/Resque/Redis.php
  3. +1 −1 lib/Resque/RedisCluster.php
View
@@ -142,7 +142,7 @@ public function getInstance()
return $this->instance;
}
- if(!class_exists($this->payload['class'])) {
+ if(!class_exists($this->payload['class'], false)) {

This comment has been minimized.

Show comment Hide comment
@chrisboulton

chrisboulton Jun 14, 2011

I'm not sure if we want to disable autoloading here - if your app is to handle the autoloading of job classes on demand for you, this would break that?

Other two occurrences are fine though.

@chrisboulton

chrisboulton Jun 14, 2011

I'm not sure if we want to disable autoloading here - if your app is to handle the autoloading of job classes on demand for you, this would break that?

Other two occurrences are fine though.

throw new Resque_Exception(
'Could not find job class ' . $this->payload['class'] . '.'
);
View
@@ -1,7 +1,7 @@
<?php
// Third- party apps may have already loaded Resident from elsewhere
// so lets be careful.
-if(!class_exists('Redisent')) {
+if(!class_exists('Redisent', false)) {
require_once dirname(__FILE__) . '/../Redisent/Redisent.php';
}
@@ -1,7 +1,7 @@
<?php
// Third- party apps may have already loaded Resident from elsewhere
// so lets be careful.
-if(!class_exists('RedisentCluster')) {
+if(!class_exists('RedisentCluster', false)) {
require_once dirname(__FILE__) . '/../Redisent/RedisentCluster.php';
}

0 comments on commit cd3b0cc

Please sign in to comment.