Loading libraries/ParserCSV.inc +5 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function rewind($pos = 0) { if ($this->handle) { fseek($this->handle, $pos); Loading @@ -58,6 +59,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function next() { if ($this->handle) { $this->currentLine = feof($this->handle) ? NULL : fgets($this->handle); Loading @@ -69,6 +71,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function valid() { return isset($this->currentLine); } Loading @@ -76,6 +79,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function current() { return $this->currentLine; } Loading @@ -90,6 +94,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function key() { return 'line'; } Loading Loading @@ -126,7 +131,6 @@ class ParserCSV { $this->startByte = 0; $this->lineLimit = 0; $this->lastLinePos = 0; ini_set('auto_detect_line_endings', TRUE); if (extension_loaded('mbstring') && variable_get('feeds_use_mbstring', TRUE)) { $this->useMbString = TRUE; } Loading plugins/FeedsParser.inc +2 −0 Original line number Diff line number Diff line Loading @@ -777,6 +777,7 @@ class FeedsDateTime extends DateTime { /** * Upon unserializing, we must re-build ourselves using local variables. */ #[\ReturnTypeWillChange] public function __wakeup() { $this->__construct($this->_serialized_time, new DateTimeZone($this->_serialized_timezone)); } Loading Loading @@ -834,6 +835,7 @@ class FeedsDateTime extends DateTime { * In order to set a timezone for a datetime that doesn't have such * granularity, merge() it with one that does. */ #[\ReturnTypeWillChange] public function setTimezone($tz, $force = FALSE) { // PHP 5.2.6 has a fatal error when setting a date's timezone to itself. // http://bugs.php.net/bug.php?id=45038 Loading tests/feeds.test +13 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,13 @@ class FeedsWebTestCase extends DrupalWebTestCase { protected $profile = 'testing'; /** * A user with permission to bypass node access and administer nodes. * * @var object */ protected $admin_user; /** * {@inheritdoc} */ Loading Loading @@ -97,6 +104,12 @@ class FeedsWebTestCase extends DrupalWebTestCase { // Create an admin user and log in. $this->admin_user = $this->drupalCreateUser($permissions); // Track down which modules are not enabled. if (!$this->admin_user) { $enabled_modules = array_keys(system_list('module_enabled')); $result = array_intersect($modules, $enabled_modules); $this->assertEqual($modules, $result); } $this->drupalLogin($this->admin_user); // Create two content types if they don't exist yet. Loading tests/feeds_mapper_file.test +1 −0 Original line number Diff line number Diff line Loading @@ -773,6 +773,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase { 'instance[settings][file_directory]' => '', 'instance[settings][alt_field]' => 1, 'instance[settings][title_field]' => 1, 'instance[settings][file_directory]' => '', ); $this->drupalPost("admin/structure/types/manage/$typename/fields/field_images", $edit, t('Save settings')); Loading Loading
libraries/ParserCSV.inc +5 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function rewind($pos = 0) { if ($this->handle) { fseek($this->handle, $pos); Loading @@ -58,6 +59,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function next() { if ($this->handle) { $this->currentLine = feof($this->handle) ? NULL : fgets($this->handle); Loading @@ -69,6 +71,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function valid() { return isset($this->currentLine); } Loading @@ -76,6 +79,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function current() { return $this->currentLine; } Loading @@ -90,6 +94,7 @@ class ParserCSVIterator implements Iterator { /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function key() { return 'line'; } Loading Loading @@ -126,7 +131,6 @@ class ParserCSV { $this->startByte = 0; $this->lineLimit = 0; $this->lastLinePos = 0; ini_set('auto_detect_line_endings', TRUE); if (extension_loaded('mbstring') && variable_get('feeds_use_mbstring', TRUE)) { $this->useMbString = TRUE; } Loading
plugins/FeedsParser.inc +2 −0 Original line number Diff line number Diff line Loading @@ -777,6 +777,7 @@ class FeedsDateTime extends DateTime { /** * Upon unserializing, we must re-build ourselves using local variables. */ #[\ReturnTypeWillChange] public function __wakeup() { $this->__construct($this->_serialized_time, new DateTimeZone($this->_serialized_timezone)); } Loading Loading @@ -834,6 +835,7 @@ class FeedsDateTime extends DateTime { * In order to set a timezone for a datetime that doesn't have such * granularity, merge() it with one that does. */ #[\ReturnTypeWillChange] public function setTimezone($tz, $force = FALSE) { // PHP 5.2.6 has a fatal error when setting a date's timezone to itself. // http://bugs.php.net/bug.php?id=45038 Loading
tests/feeds.test +13 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,13 @@ class FeedsWebTestCase extends DrupalWebTestCase { protected $profile = 'testing'; /** * A user with permission to bypass node access and administer nodes. * * @var object */ protected $admin_user; /** * {@inheritdoc} */ Loading Loading @@ -97,6 +104,12 @@ class FeedsWebTestCase extends DrupalWebTestCase { // Create an admin user and log in. $this->admin_user = $this->drupalCreateUser($permissions); // Track down which modules are not enabled. if (!$this->admin_user) { $enabled_modules = array_keys(system_list('module_enabled')); $result = array_intersect($modules, $enabled_modules); $this->assertEqual($modules, $result); } $this->drupalLogin($this->admin_user); // Create two content types if they don't exist yet. Loading
tests/feeds_mapper_file.test +1 −0 Original line number Diff line number Diff line Loading @@ -773,6 +773,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase { 'instance[settings][file_directory]' => '', 'instance[settings][alt_field]' => 1, 'instance[settings][title_field]' => 1, 'instance[settings][file_directory]' => '', ); $this->drupalPost("admin/structure/types/manage/$typename/fields/field_images", $edit, t('Save settings')); Loading