File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8
8
9
9
- Added methods for retrieving task lists (lending requests and requested resources).
10
10
11
+ ## [ 0.7.1] - 2018-10-23
12
+
13
+ ### Fixed
14
+
15
+ - Fixed infinite loop in ` Users::search() ` when search result only contained contacts.
16
+
11
17
## [ 0.7.0] - 2018-09-02
12
18
13
19
### Added
@@ -65,6 +71,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
65
71
66
72
tbd.
67
73
68
- [ Unreleased ] : https://github.com/scriptotek/php-marc/compare/v0.6.1...HEAD
74
+ [ Unreleased ] : https://github.com/scriptotek/php-marc/compare/v0.7.1...HEAD
75
+ [ 0.7.1 ] : https://github.com/scriptotek/php-marc/compare/v0.7.0...v0.7.1
69
76
[ 0.7.0 ] : https://github.com/scriptotek/php-marc/compare/v0.6.1...v0.7.0
70
77
[ 0.6.1 ] : https://github.com/scriptotek/php-marc/compare/v0.6.0...v0.6.1
Original file line number Diff line number Diff line change @@ -97,14 +97,15 @@ public function search($query, array $options = [])
97
97
break ;
98
98
}
99
99
100
- if (!isset ($ response ->user )) {
100
+ if (!isset ($ response ->user ) || empty ( $ response -> user ) ) {
101
101
// We cannot trust the value in 'total_record_count', so if there are no more records,
102
102
// we have to assume the result set is depleted.
103
103
// See: https://github.com/scriptotek/php-alma-client/issues/7
104
104
break ;
105
105
}
106
106
107
107
foreach ($ response ->user as $ data ) {
108
+ $ offset ++;
108
109
// Contacts without a primary identifier will have the primary_id
109
110
// field populated with something weird like "no primary id (123456789023)".
110
111
// We ignore those.
@@ -118,7 +119,6 @@ public function search($query, array $options = [])
118
119
$ user ->init ();
119
120
}
120
121
yield $ user ;
121
- $ offset ++;
122
122
}
123
123
if ($ offset >= $ response ->total_record_count ) {
124
124
break ;
You can’t perform that action at this time.
0 commit comments