Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added missing null check

  • Loading branch information...
commit 91746a93f156ccb434e9781ad62983e2f926e2f3 1 parent 65be19a
@lampjunkie authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/DataTable/DataTable.php
View
10 src/DataTable/DataTable.php
@@ -459,11 +459,13 @@ protected function renderDataTableOptions()
*/
protected function replaceJsonFunctions($json)
{
- foreach($this->jsonFunctions as $key => $function){
+ if(!is_null($this->jsonFunctions)){
+ foreach($this->jsonFunctions as $key => $function){
- $search = '"' . $key . '"';
+ $search = '"' . $key . '"';
- $json = str_replace($search, $function, $json);
+ $json = str_replace($search, $function, $json);
+ }
}
return $json;
@@ -728,4 +730,4 @@ protected function buildColumnIndexNameCache()
$this->columnIndexNameCache[$column->getName()] = $index;
}
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.