To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 4537

Show
Ignore:
Timestamp:
02/02/12 10:47:23 (4 months ago)
Author:
tboutell
Message:

Don't misbehave if Viddler returns a response other than false with no video in it

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.5/lib/embedService/aViddler.class.php

    r4535 r4537  
    155155    } 
    156156    $info = array(); 
     157    // Sometimes the viddler API decides it's fun to return something other than false 
     158    // on failure. Just make sure there's a video in there 
     159    if (!isset($result['video'])) 
     160    { 
     161      return false; 
     162    } 
    157163    $result = $result['video']; 
    158164    $info['id'] = (string) $result['id'];