Skip to content

Commit

Permalink
sort() had wrong property accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
shuckster committed Mar 2, 2021
1 parent 797d3c4 commit 1d02fb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iTunesXMLparser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ protected function sort( $left, $right ) {
$field = $this->sort_field;
$direction = $this->sort_direction;

if ( !isset( $left[ $field ] ) ) {
if ( !isset( $left->{ $field } ) ) {
return 1;
}
elseif ( !isset( $right[ $field ] ) ) {
elseif ( !isset( $right->{ $field } ) ) {
return -1;
}

// Return the strcmp() of the two fields
$left = $left[ $field ];
$right = $right[ $field ];
$left = $left->{ $field };
$right = $right->{ $field };

switch ( gettype( $left ) ) {

Expand Down

0 comments on commit 1d02fb4

Please sign in to comment.