In debug mode I get this notices:Quote
/include/themes.inc.php
- Notice line 1864: Undefined offset: 1
- Notice line 1866: Undefined offset: 1
- Notice line 1866: Undefined offset: 1
- Notice line 1873: Undefined offset: 1
In the header section tabs:
Quote
// Header for tabs
$tabs .= $template['tab_header'];
if ($CONFIG['tabs_dropdown']) {
// Dropdown list for all pages
preg_match('/cat=([\d]+)/', $template['page_link'], $matches);
$tabs_dropdown_js = <<< EOT
I'm trying to fix it by adding the following code to define offset: 1
Quote
// Header for tabs
$tabs .= $template['tab_header'];
if ($CONFIG['tabs_dropdown']) {
// Dropdown list for all pages
preg_match('/cat=([\d]+)/', $template['page_link'], $matches);
if (!$matches) {
// return as if {$matches[1]} is empty if no match
return preg_replace('/cat=([\d]+)/', 'cat=""', $template['page_link']);
}
$tabs_dropdown_js = <<< EOT
but it seems that it does not work, I mean, the variable offset: 1 not shown in notices but the template is broken
any idea to define offset: 1?
Thanks in advance. :-\
other notices on file usermgr.phpQuote
- Runtime Notice line 142: Non-static method Inspekt::makeSuperCage() should not be called statically
- Notice line 198: Undefined variable: username
- Runtime Notice line 331: Non-static method CPGPluginAPI::filter() should not be called statically
- Notice line 342: Undefined variable: username
- Notice line 343: Undefined variable: username
- Notice line 350: Undefined variable: username
- Notice line 351: Undefined variable: username
- Notice line 355: Undefined variable: username
- Notice line 356: Undefined variable: username
- Notice line 360: Undefined variable: username
- Notice line 361: Undefined variable: username
- Notice line 368: Undefined variable: username
- Notice line 369: Undefined variable: username
- Notice line 373: Undefined variable: username
- Notice line 374: Undefined variable: username
- Runtime Notice line 700: Non-static method CPGPluginAPI::filter() should not be called statically
I solved define username variable by changing the following lines in usermgr.php:
Quote
183. if ($search) {
184. $username = '&username='.$search; //<--- this one up to line 182.
Best Regards
I'm sure there are a lot of code sections that create such notices. The second issue would be fixed by adding something like
$username = '';
somewhere above
if ($search) {
$username = '&username='.$search;
but as it doesn't affect Coppermine's functionality, we usually don't fix such notices. I hadn't looked at the first issue, but I assume it also doesn't affect anything than the debug notice output?
Thank you very much, ΑndrĂ©.