diff --git a/lib/private/ocs/result.php b/lib/private/ocs/result.php index 9f14e8da7e8d7b6499a3d138d425a835bf03973f..0e3b85d5905b1de2e1fedaae9224d36c537098a7 100644 --- a/lib/private/ocs/result.php +++ b/lib/private/ocs/result.php @@ -96,7 +96,7 @@ class OC_OCS_Result{ * @return bool */ public function succeeded() { - return (substr($this->statusCode, 0, 1) === '1'); + return ($this->statusCode == 100); } diff --git a/tests/lib/api.php b/tests/lib/api.php index 233beebd68a8551964fd1f1d5434ef28a4111c29..0f7d08543ea51a8121d7bbc47e1fa1ce6850e1e5 100644 --- a/tests/lib/api.php +++ b/tests/lib/api.php @@ -37,7 +37,7 @@ class Test_API extends PHPUnit_Framework_TestCase { function dataProviderTestOneResult() { return array( array(100, true), - array(101, true), + array(101, false), array(997, false), ); }