[fix] Fix up more PHP deprecation warnings

This commit is contained in:
Solomon Peachy 2023-10-19 21:14:05 -04:00
parent a876b32025
commit 1340a0f828
5 changed files with 6 additions and 6 deletions

View file

@ -1391,7 +1391,7 @@ function display_users($database, $viewer_user_id, $sql_search_string = '') {
$user_count = pg_num_rows($user_list);
for ($i=0; $i < $user_count; $i++) {
$user = pg_fetch_assoc($user_list, $i);
if ($user['identifier'] != $viewer_user_data['identifier']) {
if ($viewer_user_data !== FALSE && $user['identifier'] != $viewer_user_data['identifier']) {
/* Don't list users with no photos unless we're an admin! */
if ($viewer_user_data !== FALSE && ($viewer_user_data['type'] != PO_USER_TYPE_ADMIN) &&

View file

@ -249,7 +249,7 @@ function photo_parse_exif($database, $index, $user_id, $image_data, &$output) {
$bogus_gps = FALSE;
$image_data = extract_exiftool_metadata($image_data, $index, "EXIF", $output);
$image_data = extract_exiftool_metadata($image_data, $index, $output, "EXIF");
$image_data["exif"] = "";
$exif_data = $image_data['exiftool_data_EXIF'];

View file

@ -124,7 +124,7 @@ function get_current_volume($database, $image_file) {
return $new_volume;
}
function extract_exiftool_metadata($image_data, $index, $type = "EXIF", &$output) {
function extract_exiftool_metadata($image_data, $index, &$output, $type = "EXIF") {
global $sys_exiftool;
global $strings;
@ -461,7 +461,7 @@ function photo_import_single($database, $index, &$image_data, &$output) {
} else {
$master = $image_data['file'][$index]['master'];
$image_data = extract_exiftool_metadata($image_data, $index, "ORIENT", $output);
$image_data = extract_exiftool_metadata($image_data, $index, $output, "ORIENT");
$image_data = photo_parse_exif_orientation_colorspace($database, $index, $po_user['id'], $image_data, "ORIENT");
}

View file

@ -250,7 +250,7 @@ function photo_parse_iptc($database, $index, $user_id, $image_data, &$output) {
$creation_time = "";
$keywords = "";
$image_data = extract_exiftool_metadata($image_data, $index, "IPTC", $output);
$image_data = extract_exiftool_metadata($image_data, $index, $output, "IPTC");
/* Populate IPTC data */
$iptc_data = $image_data['exiftool_data_IPTC'];
foreach ($iptc_data as $key => $value) {

View file

@ -59,7 +59,7 @@ function photo_parse_rdf($database, $index, $user_id, $image_data, &$output) {
$country = "";
$keywords = "";
$image_data = extract_exiftool_metadata($image_data, $index, "XMP", $output);
$image_data = extract_exiftool_metadata($image_data, $index, $output, "XMP");
/* Populate RDF data */
$rdf_data = $image_data['exiftool_data_XMP'];
foreach ($rdf_data as $key => $value) {