Collapse some nested if statements
[lhc/web/wiklou.git] / includes / api / ApiPageSet.php
index 450ebb6..b321c7d 100644 (file)
@@ -1398,10 +1398,10 @@ class ApiPageSet extends ApiBase {
                                                $data[$toPageId],
                                                $this->mGeneratorData[$fromNs][$fromDBkey]
                                        );
-                                       if ( $result instanceof ApiResult ) {
-                                               if ( !$result->addValue( $path, $toPageId, $data[$toPageId], ApiResult::OVERRIDE ) ) {
-                                                       return false;
-                                               }
+                                       if ( $result instanceof ApiResult &&
+                                               !$result->addValue( $path, $toPageId, $data[$toPageId], ApiResult::OVERRIDE )
+                                       ) {
+                                               return false;
                                        }
                                }
                        }