Skip to content

Commit 6eb830c

Browse files
author
Michael Christopher
committed
Version 1.4
1 parent 318341c commit 6eb830c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ Your [notifications page](https://app.zencoder.com/notifications) will come in h
195195

196196
VERSIONS
197197
---------
198+
Version 1.4 - 2011-10-06 Fixed error with adding api_key to URL
198199
Version 1.3 - 2011-09-21 Fixed bundled SSL certification chain and made catch_and_parse() static
199200
Version 1.2 - 2011-08-06 Added fixes for PHP Notices and SSL handling
200201
Version 1.1 - 2010-06-04 Added General API Requests

Zencoder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
*/
99
define('ZENCODER_LIBRARY_NAME', "ZencoderPHP");
10-
define('ZENCODER_LIBRARY_VERSION', "1.3");
10+
define('ZENCODER_LIBRARY_VERSION', "1.4");
1111

1212
// Add JSON functions for PHP < 5.2.0
1313
if(!function_exists('json_encode')) {
@@ -124,8 +124,10 @@ function ZencoderRequest($url, $api_key = "", $params = "", $options = "") {
124124

125125
// Add api_key to url if supplied
126126
if($api_key) {
127-
$url .= "?api_key=".$api_key;
127+
$url .= (substr_count($url, '?') > 0) ? "&api_key=" : "?api_key=";
128+
$url .= $api_key;
128129
}
130+
echo $url;die;
129131

130132
// Get JSON
131133
if(is_string($params)) {

0 commit comments

Comments
 (0)