API_v3 conversionProfile action:addCurrent is passing an extra parameter to myPartnerUtils::setCurrentConversionProfile

My issue votes
0
votes
0/20 total votes used
Project:Kaltura Community Edition (CE) - Self Hosted Online Video Platform
Version:partnerServices3
Component:Code
Category:bug report
Priority:critical
Assigned:Gonen.Radai
Status:patch (code needs review)
Total votes:3
Description

When I insert any value of aspectRatio field the server make me thi error:
Fatal error: Call to a member function getId() on a non-object in /var/www/kalturaCE/kaltura/alpha/apps/kaltura/lib/myPartnerUtils.class.php on line 456
I hope it seems to be an incorrect cast using
KalturaAspectRatioType enum type
Best Regards,
Thanks. Gabriele

Comments

#1

Assigned to:Anonymous» Gonen.Radai
Status:active» patch (code needs review)

Please read below on how to fix it :

In api_v3/services/ConversionProfileService.php
find:
myPartnerUtils::setCurrentConversionProfile($this->getPartnerId(), $partnerConvertionProfile->getId());

replace with:
myPartnerUtils::setCurrentConversionProfile($this->getPartnerId(), $partnerConvertionProfile);

Thank you for reporting this and please feel free to send me more about your experience with CE.

#2

Hi,

after this fix I found a new problem in the same situation.

Fatal error: Call to a member function getId() on a non-object in /var/www/kalturaCE/kaltura/alpha/apps/kaltura/lib/myPartnerUtils.class.php on line 458

Gabriele

#3

In myPartnerUtils.class.php, line 458:
Instead of:
$partner->setCurrentConversionProfileType( $partner_conv_profile->getId() );
Should be:
$partner->setCurrentConversionProfileType($conversion_profile->getId() );