Youtube icon indicating copy to clipboard operation
Youtube copied to clipboard

getVideoInfo with single string returns 'Object of class stdClass could not be converted to string'

Open kristiana-s opened this issue 3 years ago • 2 comments

this $video= Youtube::getVideoInfo('rie-hPVJ7Sw') returns an error of Object of class stdClass could not be converted to string whereas $video= Youtube::getVideoInfo(['rie-hPVJ7Sw']) returns correct data, albeit in an array. Should the readme be updated or is there a genuine here?

kristiana-s avatar Aug 03 '21 09:08 kristiana-s

@kristiana-s Did you manage to resolve the issue?

alaouy avatar Nov 14 '21 16:11 alaouy

@alaouy Apologies for the delay, I've just resorted to fetching the data from the array as is returned when passing the id ['rie-hPVJ7Sw'] like so. However, as I said, wasn't obvious from the readme that it is the case.

kristiana-s avatar May 04 '22 13:05 kristiana-s