Skip to content
Snippets Groups Projects
Commit 6cc578d1 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #8018 from owncloud/ocs_result_success_is_100

OC_OCS_Result Class, Only accept 100 code as success
parents 8d058483 b00592ad
Branches
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ class OC_OCS_Result{
* @return bool
*/
public function succeeded() {
return (substr($this->statusCode, 0, 1) === '1');
return ($this->statusCode == 100);
}
......
......@@ -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),
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment