Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #250 - Check that the next line exists #251

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/import_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function readEntry() {
$server = $this->getServer();

# The first line should be the DN
if (preg_match('/^dn:/',$lines[0])) {
if (array_key_exists(0, $lines) && preg_match('/^dn:/', $lines[0])) {
list($text,$dn) = $this->getAttrValue(array_shift($lines));

# The second line should be our changetype
Expand Down Expand Up @@ -263,7 +263,7 @@ private function getAttrValue($line) {
/**
* Get the lines of the next entry
*
* @return The lines (unfolded) of the next entry
* @return array The lines (unfolded) of the next entry
*/
private function nextLines() {
$current = array();
Expand Down