Announcement

#1 2014-03-14 10:49:44

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Meta and warning on contact page

Hello ddtddt,

Notice: Undefined offset: 1 in plugins/meta/main.inc.php on line 145

(same kind of error on admin page for contact page)

Code:

$ svn diff
Index: main.inc.php
===================================================================
--- main.inc.php        (revision 1685)
+++ main.inc.php        (working copy)
@@ -138,7 +138,7 @@
   if($MPC['state'] == 'active')
        {
        global $conf;
-         if (isset($page['section']) and $page['section'] == 'contact')
+  if (isset($page['section']) and $page['section'] == 'contact' and isset($conf['contactmeta']) and strpos($conf['contactmeta'], ',') !== false)
                {
 $metacontact = explode(',', $conf['contactmeta']);
 $metakeyED=trigger_event('AP_render_content', $metacontact[0]);
Index: admin/admin.php
===================================================================
--- admin/admin.php     (revision 1685)
+++ admin/admin.php     (working copy)                                                                                                                                                                                                                                                 
@@ -226,6 +226,10 @@
        break;
 
        case 'contactmeta':
+    if (empty($conf['contactmeta']))
+    {
+      $conf['contactmeta'] = ',';
+    }
 
 $metacontact = explode(',', $conf['contactmeta']);

Do you want me to commit?

Piwigo version: 2.6.1
Meta version: 2.6.a

Offline

 

#2 2014-04-20 09:24:44

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: Meta and warning on contact page


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact