Plugin Directory

Changeset 1070022


Ignore:
Timestamp:
01/17/2015 03:18:20 PM (11 years ago)
Author:
hoest
Message:

Fix https://github.com/hoest/knvb-api/issues/4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • knvb-api/trunk/knvb-client.php

    r1057161 r1070022  
    9393      if(isset($list) && strpos($extra, 'thuis=1') !== false) {
    9494        $thuis = array_filter($list, function($row) {
    95           return (isset($row->ThuisClub) && substr($row->ThuisClub, 0, 7) === $this->clubName);
     95          $length = strlen($this->clubName);
     96          return (isset($row->ThuisClub) && substr($row->ThuisClub, 0, $length) === $this->clubName);
    9697        });
    9798
    9899        $uit = array_filter($list, function($row) {
    99           return (isset($row->ThuisClub) && substr($row->UitClub, 0, 7) === $this->clubName);
     100          $length = strlen($this->clubName);
     101          return (isset($row->ThuisClub) && substr($row->UitClub, 0, $length) === $this->clubName);
    100102        });
    101103
Note: See TracChangeset for help on using the changeset viewer.