|
1 | 1 | <?php
|
2 | 2 |
|
3 | 3 | /**
|
4 |
| - * Brightcove PHP MAPI Wrapper 2.0.3 (14 FEBRUARY 2011) |
| 4 | + * Brightcove PHP MAPI Wrapper 2.0.4 (18 FEBRUARY 2011) |
5 | 5 | * (Formerly known as Echove)
|
6 | 6 | *
|
7 | 7 | * REFERENCES:
|
@@ -463,7 +463,7 @@ public function createMedia($type = 'video', $file = NULL, $meta, $options = NUL
|
463 | 463 | }
|
464 | 464 | }
|
465 | 465 |
|
466 |
| - if($options['create_multiple_renditions'] === TRUE && $options['H264NoProcessing'] === TRUE) |
| 466 | + if((isset($options['create_multiple_renditions']) && $options['create_multiple_renditions'] === TRUE) && (isset($options['H264NoProcessing']) && $options['H264NoProcessing'] === TRUE)) |
467 | 467 | {
|
468 | 468 | unset($options['H264NoProcessing']);
|
469 | 469 |
|
@@ -1116,17 +1116,24 @@ public function convertTags($tags, $implode = FALSE)
|
1116 | 1116 | public function tagsFilter($assets, $tags)
|
1117 | 1117 | {
|
1118 | 1118 | $filtered = array();
|
| 1119 | + $array = explode(',', strtolower($tags)); |
1119 | 1120 |
|
1120 | 1121 | foreach($assets as $asset)
|
1121 | 1122 | {
|
1122 | 1123 | foreach($asset->tags as $k => $v)
|
1123 | 1124 | {
|
1124 |
| - $asset->tags[$k] = strtolower($v); |
| 1125 | + if(isset($asset->tags)) |
| 1126 | + { |
| 1127 | + $asset->tags[$k] = strtolower($v); |
| 1128 | + } |
1125 | 1129 | }
|
1126 | 1130 |
|
1127 |
| - if(count(array_intersect(explode(',', strtolower($tags)), $asset->tags)) > 0) |
| 1131 | + if(isset($asset->tags)) |
1128 | 1132 | {
|
1129 |
| - $filtered[] = $asset; |
| 1133 | + if(count(array_intersect($array, $asset->tags)) > 0) |
| 1134 | + { |
| 1135 | + $filtered[] = $asset; |
| 1136 | + } |
1130 | 1137 | }
|
1131 | 1138 | }
|
1132 | 1139 |
|
@@ -1409,29 +1416,29 @@ private function validType($type)
|
1409 | 1416 |
|
1410 | 1417 | /**
|
1411 | 1418 | * Dummy method for backwards compatability
|
1412 |
| - * @todo Deprecate in > 2.0.5 |
| 1419 | + * @todo Deprecate in > 2.1.0 |
1413 | 1420 | */
|
1414 | 1421 | public function filter($assets, $tags)
|
1415 | 1422 | {
|
1416 |
| - return tagsFilter($assets, $tags); |
| 1423 | + return $this->tagsFilter($assets, $tags); |
1417 | 1424 | }
|
1418 | 1425 |
|
1419 | 1426 | /**
|
1420 | 1427 | * Dummy method for backwards compatability
|
1421 |
| - * @todo Deprecate in > 2.0.5 |
| 1428 | + * @todo Deprecate in > 2.1.0 |
1422 | 1429 | */
|
1423 | 1430 | public function tags($tags, $implode = FALSE)
|
1424 | 1431 | {
|
1425 |
| - return convertTags($tags, $implode); |
| 1432 | + return $this->convertTags($tags, $implode); |
1426 | 1433 | }
|
1427 | 1434 |
|
1428 | 1435 | /**
|
1429 | 1436 | * Dummy method for backwards compatability
|
1430 |
| - * @todo Deprecate in > 2.0.5 |
| 1437 | + * @todo Deprecate in > 2.1.0 |
1431 | 1438 | */
|
1432 | 1439 | public function time($ms, $seconds = FALSE)
|
1433 | 1440 | {
|
1434 |
| - return convertTime($ms, $seconds); |
| 1441 | + return $this->convertTime($ms, $seconds); |
1435 | 1442 | }
|
1436 | 1443 |
|
1437 | 1444 | /**
|
@@ -1521,8 +1528,13 @@ public function __construct(BCMAPI $obj, $error_code, $raw_error = NULL)
|
1521 | 1528 |
|
1522 | 1529 | if(isset($raw_error))
|
1523 | 1530 | {
|
| 1531 | + if(isset($raw_error->error) && isset($raw_error->error->message) && isset($raw_error->error->code)) |
| 1532 | + { |
| 1533 | + $raw_error = $raw_error->error; |
| 1534 | + } |
| 1535 | + |
1524 | 1536 | $error .= "'\n";
|
1525 |
| - $error .= isset($raw_error->error) ? '== ' . $raw_error->error . ' (' . $raw_error->code . ') ==' . "\n" : ''; |
| 1537 | + $error .= (isset($raw_error->message) && isset($raw_error->code)) ? '== ' . $raw_error->message . ' (' . $raw_error->code . ') ==' . "\n" : ''; |
1526 | 1538 | $error .= isset($raw_error->errors[0]) ? '== ' . $raw_error->errors[0]->error . ' (' . $raw_error->errors[0]->code . ') ==' . "\n" : '';
|
1527 | 1539 | }
|
1528 | 1540 |
|
|
0 commit comments