1.0.0 Alpha Release #59

Merged
netkas merged 213 commits from v1.0.0_alpha into master 2023-01-29 23:27:58 +00:00
Showing only changes of commit 33e373c798 - Show all commits

View file

@ -74,15 +74,18 @@
*/ */
public function deleteEntry(string $name): bool public function deleteEntry(string $name): bool
{ {
foreach($this->Entries as $entry) // Find the entry
foreach($this->Entries as $index => $entry)
{ {
if($entry->getName() === $name) if($entry->getName() === $name)
{ {
$this->Entries = array_diff($this->Entries, [$entry]); // Remove the entry
unset($this->Entries[$index]);
return true; return true;
} }
} }
// Entry not found
return false; return false;
} }