Skip to content

Commit

Permalink
TODO for constant not available until PHP 5.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jun 27, 2014
1 parent 6d2f309 commit 918ebac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions framework/Pack/lib/Horde/Pack/Driver/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static public function supported()
public function pack($data)
{
$d = json_encode($data);
// TODO: JSON_ERROR_UTF8 = 5; available as of PHP 5.3.3
if (json_last_error() === 5) {
throw new Horde_Pack_Exception('Non UTF-8 data cannot be JSON packed.');
}
Expand Down
6 changes: 3 additions & 3 deletions framework/Serialize/lib/Horde/Serialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ static protected function _serialize($data, $mode, $params = null)
case self::JSON:
$tmp = json_encode($data);

/* Basic error handling attempts. Error code 5, although not
* documented, indicates non UTF-8 data. */
if (json_last_error() == 5) {
/* Basic error handling attempts.
* TODO: JSON_ERROR_UTF8 = 5; available as of PHP 5.3.3 */
if (json_last_error() === 5) {
$data = json_encode(Horde_String::convertCharset($data, $params, 'UTF-8', true));
} else {
$data = $tmp;
Expand Down
9 changes: 9 additions & 0 deletions imp/js/ckeditor/imageupload.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ document.observe('dom:loaded', function() {
if (!Object.isString(data)) {
rf.attrdata = data;
}
var c;
return true;
},
params: params.toObject(),
Expand All @@ -51,6 +52,14 @@ document.observe('dom:loaded', function() {
style: 'display:inline-block;margin-top:10px;',
type: 'button'
}, 'browse');

definition.dialog.on('cancel', function(ev2) {
var a;
});

definition.dialog.on('ok', function(ev2) {
var b;
});
}
});
});

0 comments on commit 918ebac

Please sign in to comment.