Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
when there is no entry to get, the function didn't created an empty array and returned it, it just returned an undefined object.
with the fix it will return an empty array;
The change is to add the following line in kaltura.admin.inc:
$returned_entries = array();
Comment | File | Size | Author |
---|---|---|---|
#7 | kaltura-897112-array_merge_errors.patch | 3.99 KB | xurizaemon |
#3 | kaltura.notification.inc_.patch | 651 bytes | gonen.radai_kaltura |
#2 | includes.patch | 110.54 KB | noa.issler |
kaltura.admin_.inc_.patch | 446 bytes | noa.issler | |
Comments
Comment #1
xurizaemonThanks Noa, this patch looks good.
I'd like to test it out first though - can you please detail exactly the steps to duplicate this error so the fix can be tested?
Comment #2
noa.issler CreditAttribution: noa.issler commentedattached now the new patch of the first original bug and another one.
bug 1:
in your drupal site under index.php?q=admin/settings/kaltura/import
you get the following message in red (not always only when there is nothing to import):
warning: array_merge() [function.array-merge]: Argument #3 is not an array in /var/www/vhosts/kanopystreaming.com/httpdocs/RMIT/modules/kaltura/includes/kaltura.admin.inc on line 769.
bug 2:
the notifications from kalturas' servers where deleting tags and admin tags from node_kaltura table.
Comment #3
gonen.radai_kaltura CreditAttribution: gonen.radai_kaltura commentedI think that the correct patch for the #2 bug is the attached patch.
however - I'm not yet sure this fix is full-proof yet, I've witnessed tags still being cleared although this fix was applied.
Gonen
Comment #4
xurizaemon@noa.issler - sorry to be a pain but the patch in #1 is 446b and the patch in #2 is 110Kb ... a bit of a leap.
Can you please
(1) file your tag deletion patch against a separate issue (I don't believe one exists yet for this), and
(2) make sure patches you submit contain only the lines of code actually changed?
Might be that you're doing a whitespace cleanup for coding standards (I know some areas of the module are a mess, #850378: Coding standards... already exists for this). If so, please keep such patches separate from patches which affect how the code works.
Thanks again - really do appreciate your contributions, and hope you understand how the Drupal's patch guidelines exist to help module maintainers help you :)
Comment #5
xurizaemonResetting issue title to original issue.
Comment #6
patrickroma CreditAttribution: patrickroma commentedI can confirm this behaviour: When there is no entry to import the following error is shown:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in blala/mysite/sites/all/modules/kaltura/includes/kaltura.admin.inc on line 747
Does the patch above solve this issue?
Comment #7
xurizaemon@patrickroma - please try the attached patch for the array_merge() issue at admin/settings/kaltura/entries/import when no new items are present on Kaltura server
Comment #8
patrickroma CreditAttribution: patrickroma commentedYes, the Patch Solves the situation.
Comment #9
patrickroma CreditAttribution: patrickroma commentedYes, the Patch Solves the situation.
Comment #10
xurizaemonI've committed the patch in #7 for the array_merge issue (noa's bug #1) now and will close this ticket.
There are three separate issues referenced in this ticket; I am associating this ticket with the array_merge() one. I suspect that the exception when $returned_entries is not set is already fixed with other work (prob ).
The tag clearing issue I need more detail on and think it warrants a separate issue; Noa and Gonen, please see my questions above and open a new ticket with details on what behaviour you're seeing (ideally including full steps to reproduce the issue).
Thanks all!