SMFHacks.com
SMF Gallery Pro => Support => Topic started by: pete on January 22, 2022, 07:23:14 am
-
Since updating my php to 7.4 I get error messages
8: Trying to access array offset on value of type null
/smf/Sources/Gallery2.php
Line: 1472
1471: 'password' => $row4['password'],
==>1472: 'private' => $row4['private'],
I'm currently using Gallery Pro Version 8.0.6
Any ideas why?
Thanks
-
Was fixed in a later version
Find
$context['gallery_user_settings'] = array(
'password' => $row4['password'],
'private' => $row4['private'],
);
before it add
if (empty($row4['id_member']))
{
$row4['password'] = '';
$row4['private'] = '';
}
-
Thanks. I did that and now getting
8192: implode(): Passing glue string after array is deprecated. Swap the parameters
/smf/Sources/Gallery2.php
==>15016: $groupsdata = implode($user_info['groups'], ',');
-
Fixed in new version as well change
$groupsdata = implode($user_info['groups'], ',');
to
$groupsdata = implode(',',$user_info['groups']);
-
That's great. Thanks :)
-
One more, but we're getting there :)
8: Trying to access array offset on value of type null
smf/Sources/Gallery2.php
Line: 1475
==>1475:
'private' => $row4['private'],
==>1474: 'password' => $row4['password'],
==>1471: 'private' => $row4['private'],
==>1470: 'password' => $row4['password'],
Thanks
-
Sorry, think I've got it. I forgot save changes for your the first instruction on my live site. Test site was fine. I'll keep testing. Many thanks
Pete
-
Still not quite fixed. New error message
8192: implode(): Passing glue string after array is deprecated. Swap the parameters
/smf/Sources/Gallery2.php
Line: 11080
==>11080: $groupsdata = implode($user_info['groups'],',');
Is there an easy fix for this one?
Thanks
-
Same fix as the one above.
-
Thanks. Didn't notice there were 4 entries to be updated. Fingers crossed all fixed now.
-
Now getting these
8: Trying to access array offset on value of type null /smf/Sources/UserGallery2.php
Line: 1701
==>1701: 'name' => $row1['title']
/smf/Sources/UserGallery2.php
Line: 1697
==>1697: UserParentLink($row1['ID_PARENT'], $memberID);
/smf/Sources/UserGallery2.php
Line: 211
==>211: 'name' => $row1['real_name'],
/smf/Sources/UserGallery2.php
Line: 198
==>198: $context['gallery_cat_name'] = $row1['title'];
==>197: $context['gallery_orderby'] = $row1['orderby'];
==>196: $context['gallery_sortby'] = $row1['sortby'];
I really appreciate your help.
-
There is going to be a bunch of these errors in the older version
The new update which can be bought if your license expired $25
https://www.smfhacks.com/index.php?action=license
-
Ok. I've done that. Now on 9.0b. Hopefully all will be sorted now. Thank you
-
Thanks yeah should fix any of those issues plus several new features too!
-
I'm still getting these error messages, but as they are related to attachments, they are probably nothing to do with Gallery Pro, more likely the Automatic Rotation and Resize mod. Any idea? Thanks
https://bsac10c11c12.co.uk/smf/index.php?action=dlattach;topic=8074.0;attach=28967;image;ts=15470303442:
Cannot modify header information - headers already sent
File: /smf/Sources/Subs.php
Line: 3411
==>3411: header('Content-Type: text/' . (isset($_REQUEST['xml']) ? 'xml' : 'html') . '; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
-
Not from the Gallery but I would need to see that Subs.php That errors means something is outputted before the headers is sent.
-
Would you mind checking it out for me? If so, how would I send you my Subs.php? Many thanks
-
Just attach it to the post an an attachment
-
Hope this works. Thanks for your help
-
Unfortunately doesn't give me enough information.
That error points to the line where the template header is loaded. it shouldn't be called though when displaying an attachment.
-
I appreciate you trying for me. Everything seems to be working fine, and I don't get the error message often, so maybe best to just ignore it.
-
Everything has been running fine since updating to 9.0b, but now I'm getting these errors. Would these have anything to do with settings? I haven't changed anything since the update.
8: Trying to access array offset on value of type null
fileFile: smf/Sources/UserGallery2.php
Lines 200,201,202,215,1701,1705
==>200: $context['gallery_sortby'] = $row1['sortby'];
==>201: $context['gallery_orderby'] = $row1['orderby'];
==>202: $context['gallery_cat_name'] = $row1['title'];
==>215: 'name' => $row1['real_name'],
==>1701: UserParentLink($row1['ID_PARENT'], $memberID);
==>1705: 'name' => $row1['title']
Thanks
-
No, that is one I would need to look into.
-
Thanks
-
Fixed
9.0.1
+Cleaned up the stats page for SMF 2.1
!Fixed bug with updating topic/post if you using the image editor.
!Fixed some array access variables for new php version in user galleries
!Fixed the increase post count setting on bulk picture uploads.
-
I've updated to 9.0.1 on my test site, now I'm getting the attached message when trying to view a members album
-
Had one typo copy to your sources folder
-
Thanks. That's sorted it. I'll download the corrected version to put on my live site
-
Updated main zip
9.0.1a
One hotfix for user galleries.
-
I'm spending far too long trying to find the update zip, I found it earlier, but now can't. Where do I find it?
-
https://www.smfhacks.com/index.php/topic,10069.msg44413.html#msg44413
-
Thanks
-
I don't know if this error message has anything to do with Gallery Pro, but it does occur sometimes when guests (machines?) open an image. I'm not getting a reply from the snowflake mod help forum. You may be able to help?
https://bsac10c11c12.co.uk/smf/index.php?PHPSESSID=b9f061190472c83f5bd0a680f65e5bb9&action=dlattach;topic=11051.0;attach=32078;image;ts=1553017207
8: Trying to access array offset on value of type null
/smf/Sources/snowflakesMobileDetect.php
Line: 1065
==>1065: if (is_array($matchType['matches'])) {
Thanks
-
No related to the galley but you can add before that line this code
if (empty($matchType['matches']))
$matchType['matches'] = array();
-
Thank you :)
-
I'm still getting the odd error message relating to Gallery2 that you might be able to help me with.
/smf/index.php?pretty;action=gallery&sa=search2
8: Undefined index: orderby
/public_html/smf/Sources/Gallery2.php
Line: 5464
==>5464: $orderby = $_REQUEST['orderby'];
/smf/index.php?pretty;action=gallery&sa=search2
8: Undefined index: sortby
/smf/Sources/Gallery2.php
Line: 5463
==>5463: $sortby = $_REQUEST['sortby'];
/smf/index.php?pretty;action=gallery&sa=search2
8: Undefined index: gallerytype
/smf/Sources/Gallery2.php
Line: 5461
==>5461: $gallerytype = $_REQUEST['gallerytype'];
/smf/index.php?pretty;action=gallery&sa=search2
8: Undefined index: mediatype
/smf/Sources/Gallery2.php
Line: 5460
==>5460: $mediatype = $_REQUEST['mediatype'];
Many thanks
-
That should be fixed I think already.
If not here is the gallery2.php file to your sources folder.
-
Thanks. I have updated that file now.
Could the same apply to this error in the UserGallery.php?
/smf/index.php?pretty;action=gallery&su=user;u=868
8: Trying to access array offset on value of type null
/smf/Sources/UserGallery2.php
Line: 477
==>477: $context['usergallery_name'] = $row['real_name'];
-
Copy to sources folder.
-
Thank you :)