Hello,
I recently purchased xenmedio. It installed ok on my local test machine and everything works great. Then I install it on my production server and after setting everything up, I get an error when I submit a YouTube resource. I see this error message and call stack:
A non well formed numeric value encountered.
- XenForo_Application::handlePhpError() in EWRmedio/Services/YouTube.php at line 36
- EWRmedio_Services_YouTube::dumpMedia() in EWRmedio/Model/Submit.php at line 85
- EWRmedio_Model_Submit->fetchFeedInfo() in EWRmedio/ControllerPublic/Media.php at line 348
I look in that source file and see this on line 36
I don't get it. I've rechecked all my settings, including Google API key. I have tried different URLs and ones I know work ok on my local test server. I've checked my settings over and over. Any ideas? Thank you for any help you can provide.
By the way, $["duration"] is a string(8) and the value is "PT34M15S". I see that this string is parsed using a regular expression but I cannot determine why it is throwing the error. I did notice there is no Hour part to the string.
Ok this is how the data is parsed:
$duration['s'] equals "15S"
$duration['m'] equals "34M"
$duration['h'] equals ""
*** The Fix ***
I added these lines of code after preg_match() :
$duration['s'] = preg_replace('/[^0-9]/', '', $duration['s']);
$duration['m'] = preg_replace('/[^0-9]/', '', $duration['m']);
$duration['h'] = preg_replace('/[^0-9]/', '', $duration['h']);
Mark