Use (int) rather than intval()
[lhc/web/wiklou.git] / includes / api / ApiParse.php
index 148ac67..855b73d 100644 (file)
@@ -330,7 +330,7 @@ class ApiParse extends ApiBase {
                }
 
                if ( !is_null( $oldid ) ) {
-                       $result_array['revid'] = intval( $oldid );
+                       $result_array['revid'] = (int)$oldid;
                }
 
                if ( $params['redirects'] && !is_null( $redirValues ) ) {
@@ -487,7 +487,7 @@ class ApiParse extends ApiBase {
                        }
 
                        $wgParser->startExternalParse( $titleObj, $popts, Parser::OT_PREPROCESS );
-                       $xml = $wgParser->preprocessToDom( $this->content->getNativeData() )->__toString();
+                       $xml = $wgParser->preprocessToDom( $this->content->getText() )->__toString();
                        $result_array['parsetree'] = $xml;
                        $result_array[ApiResult::META_BC_SUBELEMENTS][] = 'parsetree';
                }