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

Dev/php8 - PHP8 Fixes #1467

Merged
merged 4 commits into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
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 app/lib/BaseRelationshipModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,8 @@ public function getRelationshipTypesBySubtype($ps_orientation, $pn_type_id, $pa_
# ------------------------------------------------------
private function _processRelationshipHierarchy($pn_id, $pa_hier, $pa_types, $pn_level) {
$va_types_to_return = [];
if(!is_array($pa_hier[$pn_id])) { return []; }
if (!is_array($pa_types[$pn_id])) { return [];}
if(!is_array($pa_hier[$pn_id] ?? null)) { return []; }
if (!is_array($pa_types[$pn_id] ?? null) ) { return [];}
foreach($pa_types[$pn_id] as $vs_sub_types => $va_list) { // items in this level
ksort($va_list);
foreach($va_list as $vs_key => $va_list_by_type_id) {
Expand Down
8 changes: 4 additions & 4 deletions app/lib/BatchProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1469,15 +1469,15 @@ public static function importMetadata($po_request, $ps_source, $ps_importer, $ps

if (isset($pa_options['sendMail']) && $pa_options['sendMail']) {
if ($vs_email = trim($po_request->user->get('email'))) {
$info = $t_importer->getInfoForLastImport();
$t_importer ? $info = $t_importer->getInfoForLastImport() : null;
caSendMessageUsingView($po_request, array($vs_email => $po_request->user->get('fname').' '.$po_request->user->get('lname')), __CA_ADMIN_EMAIL__, _t('[%1] Batch metadata import completed', $po_request->config->get('app_display_name')), 'batch_metadata_import_completed.tpl',
[
'sourceFile' => $pa_options['sourceFile'],
'sourceFileName' => $pa_options['sourceFileName'],
'notices' => $va_notices['general'], 'errors' => $va_errors['general'],
'total' => $info['total'],
'numErrors' => $info['numErrors'], 'numProcessed' => $info['numProcessed'],
'numSkipped' => $info['numSkipped'],
'total' => $info['total'] ?? null,
'numErrors' => $info['numErrors'] ?? null, 'numProcessed' => $info['numProcessed'] ?? null,
'numSkipped' => $info['numSkipped'] ?? null,
'subjectNameSingular' => _t('row'),
'subjectNamePlural' => _t('rows'),
'startedOn' => caGetLocalizedDate($vn_start_time),
Expand Down
2 changes: 1 addition & 1 deletion themes/default/views/bundles/related_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function caAsyncSearchResultForm<?= $vs_id_prefix; ?>(data) {
</td>
<td>
<?php
if (sizeof($this->getVar('relationship_types_by_sub_type'))) {
if (is_array($this->getVar('relationship_types_by_sub_type')) && sizeof($this->getVar('relationship_types_by_sub_type'))){
?>
<select name="<?= $vs_id_prefix; ?>_type_id{n}" id="<?= $vs_id_prefix; ?>_type_id{n}" style="display: none;"></select>
<?php
Expand Down