Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-08-08 07:34:03

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Warning in 4.7.1

I’m seeing this on 4.7.1 when changing a certain setting in adi_matrix admin tab:

Warning "Illegal offset type in isset or empty"
in /Users/adi/Sites/textpattern-4.7.1/textpattern/lib/txplib_misc.php at line 639.

textpattern/lib/txplib_misc.php:639 adminErrorHandler()
textpattern/vendors/Textpattern/Admin/Theme.php:299 has_privs()
textpattern/lib/txplib_head.php:169 Textpattern\Admin\Theme->set_state()
textpattern/lib/txplib_misc.php(1826) : eval()'d code:3360 pagetop()
adi_matrix_admin()
textpattern/lib/txplib_misc.php:1945 call_user_func_array()
textpattern/index.php:257 callback_event()

Delving into line 639:

if (isset($txp_permissions[$res]) && $privs[$user] && $txp_permissions[$res]) {

- it looks to my untrained eye that the code is testing for the existence of $txp_permissions[$res] but then using it regardless.

If course I’m assuming that it’s $txp_permissions[$res] causing the problem, so feel free to shoot me down in flames if I’m wrong.

Having said all that it’s perfectly possible it’s my code causing the hiccup.

Offline

#2 2018-08-08 07:58:13

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Warning in 4.7.1

Update … has_privs() is being called with $res as an array:

array ( 0 => 'list',   1 => 'adi_matrix_matrix_1')

Occurs when I’m assigning a matrix to the Home tab. Hmm …

Offline

#3 2018-08-08 07:58:21

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Warning in 4.7.1

The warning rather means that $res is something like an array, please check.

Edit: and that’s wrong

Offline

#4 2018-08-08 22:41:54

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Warning in 4.7.1

All good, thanks. Caused by the use of “Articles” as a matrix tab name – which clashes with the standard Articles list tab, hence the system getting confused.

Offline

Board footer

Powered by FluxBB