You are here

protected function context_reaction_block::json_decode in Context 7.3

Same name and namespace in other branches
  1. 6.3 plugins/context_reaction_block.inc \context_reaction_block::json_decode()
  2. 6 plugins/context_reaction_block.inc \context_reaction_block::json_decode()

Compatibility wrapper around json_decode().

2 calls to context_reaction_block::json_decode()
context_reaction_block::editor_form_submit in plugins/context_reaction_block.inc
Submit handler context editor form.
context_reaction_block::options_form_submit in plugins/context_reaction_block.inc
Options form submit handler.

File

plugins/context_reaction_block.inc, line 594

Class

context_reaction_block
Expose blocks as context reactions.

Code

protected function json_decode($json, $assoc = FALSE) {

  // Requires PHP 5.2.
  if (function_exists('json_decode')) {
    return json_decode($json, $assoc);
  }
  else {
    watchdog('context', 'Please upgrade your PHP version to one that supports json_decode.');
  }
}