Skip to content

Commit

Permalink
Name class spouse() changed comments to array()
Browse files Browse the repository at this point in the history
  • Loading branch information
“duck7000” committed Dec 16, 2024
1 parent 44203d5 commit bab33fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Imdb/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public function height()
#----------------------------------------------------------------[ Spouse ]---
/** Get spouse(s)
* @return array [0..n] of array spouses [imdb, name, array from,
* array to, dateText, comment, children] where from/to are array
* array to, dateText, comment array(), children] where from/to are array
* [day,month,mon,year] (MonthName is the name, MonthInt the number of the month),
* @see IMDB person page /bio
*/
Expand Down Expand Up @@ -545,15 +545,15 @@ public function spouse()
$spouse->timeRange->toDate->dateComponents->year : null
);
// Comments and children
$comment = null;
$comment = array();
$children = 0;
if (!empty($spouse->attributes)) {
foreach ($spouse->attributes as $key => $attribute) {
if (!empty($attribute->text)) {
if (stripos($attribute->text, "child") !== false) {
$children = (int) preg_replace('/[^0-9]/', '', $attribute->text);
} else {
$comment .= $attribute->text;
$comment[] = $attribute->text;
}
}
}
Expand Down

0 comments on commit bab33fb

Please sign in to comment.