diff vendor/zendframework/zend-feed/src/Reader/Extension/AbstractEntry.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/vendor/zendframework/zend-feed/src/Reader/Extension/AbstractEntry.php	Fri Feb 23 15:51:18 2018 +0000
+++ b/vendor/zendframework/zend-feed/src/Reader/Extension/AbstractEntry.php	Fri Feb 23 15:52:07 2018 +0000
@@ -135,18 +135,18 @@
         if ($type === Reader\Reader::TYPE_RSS_10
             || $type === Reader\Reader::TYPE_RSS_090
         ) {
-            $this->setXpathPrefix('//rss:item[' . ($this->entryKey + 1) . ']');
+            $this->setXpathPrefix('//rss:item[' . ((int)$this->entryKey + 1) . ']');
             return $this;
         }
 
         if ($type === Reader\Reader::TYPE_ATOM_10
             || $type === Reader\Reader::TYPE_ATOM_03
         ) {
-            $this->setXpathPrefix('//atom:entry[' . ($this->entryKey + 1) . ']');
+            $this->setXpathPrefix('//atom:entry[' . ((int)$this->entryKey + 1) . ']');
             return $this;
         }
 
-        $this->setXpathPrefix('//item[' . ($this->entryKey + 1) . ']');
+        $this->setXpathPrefix('//item[' . ((int)$this->entryKey + 1) . ']');
         return $this;
     }
 
@@ -186,7 +186,7 @@
      */
     public function getXpath()
     {
-        if (!$this->xpath) {
+        if (! $this->xpath) {
             $this->setXpath(new DOMXPath($this->getDomDocument()));
         }
         return $this->xpath;