Initially includes
#3266189: Error: Call to undefined function Drupal\bridtv\Plugin\media\Source\file_prepare_directory()
#3229355: Error: Unsupported operand types
#3241677: Some links in admin-ui are not working for installation in subdirectory
#3218400: Add support for Brid.tv Playlist
#3387026: Issue #3387026: Upgrade status fixes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | brid_tv_integration_for_drupal-3387266.patch | 8.71 KB | chetan 11 |
Issue fork bridtv-3387266
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
volkerk commentedComment #4
volkerk commentedComment #5
volkerk commentedComment #8
chetan 11 commentedHi @volkerk
I have fixed all the phpcs isssue & attaching the patch for the same.
Please review this.
Comment #9
chetan 11 commentedComment #11
osopolar--- a/src/Plugin/Field/FieldType/BridtvReferenceItem.php
+++ b/src/Plugin/Field/FieldType/BridtvReferenceItem.php
@@ -124,8 +124,8 @@ class BridtvReferenceItem extends EntityReferenceItem implements BridtvVideoItem
*/
public function setValue($values, $notify = TRUE) {
if (isset($values['settings']) && is_string($values['settings'])) {
- // Unserialize the values.
- $values['settings'] = unserialize($values['settings']);
+ // Use json_decode to safely deserialize the values.
+ $values['settings'] = json_decode($values['settings'], TRUE);
}
parent::setValue($values, $notify);
}
Maybe \Drupal\bridtv\BridSync::syncVideoData() should pass the json_decoded value to setValue()? I wonder why there is a call to unserialize(), could it be related to how settings are stored (as serialized value)?
@chetan11 Why did you remove the $this->t() calls? That does not seem to be something phpcs complains about, does it?
There are other issues with phpcs which where not addressed we may fix too.
Comment #12
osopolar