aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 16:48:06 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 16:48:06 +0000
commiteb0c8dbebe95cb1ee4ff8cfb177978a4ad45b6d5 (patch)
tree48cd386e78bcd8387518686a2082c3010cbb7c2c
parent7cec5a159e163f58b037c9a027be5071e41f2094 (diff)
downloadelgg-eb0c8dbebe95cb1ee4ff8cfb177978a4ad45b6d5.tar.gz
elgg-eb0c8dbebe95cb1ee4ff8cfb177978a4ad45b6d5.tar.bz2
pulled in static method fixes in SimpleTest from their svn repository as their static use of non-static functions was throwing notices. The revision is 1729 and the file compatibility.php. See https://github.com/lorea/Elgg/commit/057a8958bb93461498fc8a79057550220c1dd161. All of our unit tests passed after change as expected.
git-svn-id: http://code.elgg.org/elgg/trunk@8847 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--vendors/simpletest/compatibility.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/vendors/simpletest/compatibility.php b/vendors/simpletest/compatibility.php
index 4e0f78a4b..5bf68621f 100644
--- a/vendors/simpletest/compatibility.php
+++ b/vendors/simpletest/compatibility.php
@@ -17,9 +17,8 @@ class SimpleTestCompatibility {
* @param object $object Thing to copy.
* @return object A copy.
* @access public
- * @static
*/
- function copy($object) {
+ static function copy($object) {
if (version_compare(phpversion(), '5') >= 0) {
eval('$copy = clone $object;');
return $copy;
@@ -35,9 +34,8 @@ class SimpleTestCompatibility {
* @param mixed $second Comparison object.
* @return boolean True if identical.
* @access public
- * @static
*/
- function isIdentical($first, $second) {
+ static function isIdentical($first, $second) {
if (version_compare(phpversion(), '5') >= 0) {
return SimpleTestCompatibility::_isIdenticalType($first, $second);
}
@@ -53,9 +51,8 @@ class SimpleTestCompatibility {
* @param mixed $second Comparison object.
* @return boolean True if same type.
* @access private
- * @static
*/
- function _isIdenticalType($first, $second) {
+ static function _isIdenticalType($first, $second) {
if (gettype($first) != gettype($second)) {
return false;
}
@@ -82,9 +79,8 @@ class SimpleTestCompatibility {
* @param mixed $second Comparison object.
* @return boolean True if identical.
* @access private
- * @static
*/
- function _isArrayOfIdenticalTypes($first, $second) {
+ static function _isArrayOfIdenticalTypes($first, $second) {
if (array_keys($first) != array_keys($second)) {
return false;
}
@@ -105,9 +101,8 @@ class SimpleTestCompatibility {
* @param mixed $second Comparison object.
* @return boolean True if same.
* @access public
- * @static
*/
- function isReference(&$first, &$second) {
+ static function isReference(&$first, &$second) {
if (version_compare(phpversion(), '5', '>=') && is_object($first)) {
return ($first === $second);
}
@@ -132,9 +127,8 @@ class SimpleTestCompatibility {
* @param string $class Root name of hiearchy.
* @return boolean True if class in hiearchy.
* @access public
- * @static
*/
- function isA($object, $class) {
+ static function isA($object, $class) {
if (version_compare(phpversion(), '5') >= 0) {
if (! class_exists($class, false)) {
if (function_exists('interface_exists')) {
@@ -158,9 +152,8 @@ class SimpleTestCompatibility {
* @param resource $handle Socket handle.
* @param integer $timeout Limit in seconds.
* @access public
- * @static
*/
- function setTimeout($handle, $timeout) {
+ static function setTimeout($handle, $timeout) {
if (function_exists('stream_set_timeout')) {
stream_set_timeout($handle, $timeout, 0);
} elseif (function_exists('socket_set_timeout')) {