File tree Expand file tree Collapse file tree 4 files changed +42
-2
lines changed Expand file tree Collapse file tree 4 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 2
2
All notable changes to this project will be documented in this file.
3
3
This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
4
4
5
+ ## 0.8.2 / 2017-01-10
6
+
7
+ ### Fixed:
8
+ - Added missing polyfill for "json_last_error_msg".
9
+
5
10
## 0.8.1 / 2016-05-08
6
11
7
12
### Fixed:
Original file line number Diff line number Diff line change 28
28
"ext-curl" : " *"
29
29
},
30
30
"autoload" : {
31
- "psr-0" : { "Bitbucket\\ " : " lib/" }
31
+ "psr-0" : { "Bitbucket\\ " : " lib/" },
32
+ "files" : [" polyfill-55.php" ]
32
33
},
33
34
"scripts" : {
34
35
"test" : " vendor/bin/phpunit"
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class Client extends ClientListener implements ClientInterface
33
33
'api_versions ' => array ('1.0 ' , '2.0 ' ), // supported versions
34
34
'format ' => 'json ' ,
35
35
'formats ' => array ('json ' , 'xml ' ), // supported response formats
36
- 'user_agent ' => 'bitbucket-api-php/0.8.1 (https://bitbucket.org/gentlero/bitbucket-api) ' ,
36
+ 'user_agent ' => 'bitbucket-api-php/0.8.2 (https://bitbucket.org/gentlero/bitbucket-api) ' ,
37
37
'timeout ' => 10 ,
38
38
'verify_peer ' => false
39
39
);
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright 2015 - 2016 Alexandru Guzinschi <alex@gentle.ro>
4
+ *
5
+ * This software may be modified and distributed under the terms
6
+ * of the MIT license. See the LICENSE file for details.
7
+ */
8
+
9
+ /**
10
+ * Provides functions unavailable in PHP releases prior to v5.5
11
+ */
12
+ if (PHP_VERSION_ID < 50500 ) {
13
+ if (!function_exists ('json_last_error_msg ' )) {
14
+ function json_last_error_msg ()
15
+ {
16
+ switch (json_last_error ()) {
17
+ case JSON_ERROR_NONE :
18
+ return 'No error ' ;
19
+ case JSON_ERROR_DEPTH :
20
+ return 'Maximum stack depth exceeded ' ;
21
+ case JSON_ERROR_STATE_MISMATCH :
22
+ return 'State mismatch (invalid or malformed JSON) ' ;
23
+ case JSON_ERROR_CTRL_CHAR :
24
+ return 'Control character error, possibly incorrectly encoded ' ;
25
+ case JSON_ERROR_SYNTAX :
26
+ return 'Syntax error ' ;
27
+ case JSON_ERROR_UTF8 :
28
+ return 'Malformed UTF-8 characters, possibly incorrectly encoded ' ;
29
+ default :
30
+ return 'Unknown error ' ;
31
+ }
32
+ }
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments