Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 62d5c1c

Browse files
nchiasson-dgidannylamb
authored andcommitted
Fixing count error by referencing error variable directly (#111)
1 parent 5d86f19 commit 62d5c1c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

includes/bookmark.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ abstract class Bookmark implements BookmarkInterface {
944944
}
945945

946946
$errors = form_get_errors();
947-
if (count($errors) === 0) {
947+
if (!$errors) {
948948
$page = pager_default_initialize(
949949
$this->getPidCount(), variable_get('islandora_bookmark_detailed_page_elements', 10), $form_state['islandora_bookmark_pager_element']
950950
);

islandora_bookmark.module

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ function islandora_bookmark_add_form_submit(array $form, array &$form_state) {
10991099
function islandora_bookmark_add_pid(array $form, array &$form_state) {
11001100
$errors = form_get_errors();
11011101

1102-
if (count($errors) === 0) {
1102+
if (!$errors) {
11031103
module_load_include('inc', 'islandora_bookmark', 'includes/api');
11041104
$key = $form_state['values']['add_bookmarks'];
11051105
$pid = $form_state['islandora_bookmark_pid'];

0 commit comments

Comments
 (0)