summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/ocs/result.php2
-rw-r--r--tests/lib/api.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/ocs/result.php b/lib/private/ocs/result.php
index 9f14e8da7e8..0e3b85d5905 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 233beebd68a..0f7d08543ea 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),
);
}