Skip to content

Commit

Permalink
replace Zend_Json_Encoder w/ json_encode
Browse files Browse the repository at this point in the history
fixes PHP notice: Array and string offset access syntax with curly braces is deprecated
  • Loading branch information
ebellempire committed Feb 16, 2021
1 parent e6bf3b5 commit 541b673
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion views/shared/items/browse.mjson.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ function sortById($a, $b)
'total_items' => count( $multipleItemMetadata )
);

echo Zend_Json_Encoder::encode( $metadata );
echo json_encode( $metadata );
2 changes: 1 addition & 1 deletion views/shared/items/show.mjson.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
// Get the basic data
$itemMetadata = $this->itemJsonifier( $item , true);
echo Zend_Json_Encoder::encode( $itemMetadata );
echo json_encode( $itemMetadata );
2 changes: 1 addition & 1 deletion views/shared/page/show.mjson.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
'updated' => metadata('simple_pages_page', 'updated'),
'text' => metadata('simple_pages_page', 'text', array('no_escape' => true)),
);
echo Zend_Json_Encoder::encode( $pageData );
echo json_encode( $pageData );
}
?>
2 changes: 1 addition & 1 deletion views/shared/search/index.mjson.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
'total_items' => count( $multipleItemMetadata )
);

echo Zend_Json_Encoder::encode( $metadata );
echo json_encode( $metadata );
2 changes: 1 addition & 1 deletion views/shared/tours/browse.mjson.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

set_current_record( 'tour', $tour );
$tourMetadata = $this->tourJsonifier( $tour );
echo Zend_Json_Encoder::encode( $tourMetadata );
echo json_encode( $tourMetadata );

$tourCount += 1;
}
Expand Down
2 changes: 1 addition & 1 deletion views/shared/tours/show.mjson.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$tourMetadata = $this->tourJsonifier( $tour );
echo Zend_Json_Encoder::encode( $tourMetadata );
echo json_encode( $tourMetadata );

0 comments on commit 541b673

Please sign in to comment.