?
avatar infograf768
infograf768
10 Mar 2018

Steps to reproduce the issue

Go to administrator/index.php?option=com_config&view=component&component=com_content

Page displays apparently fine but we get a Notice twice

[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Undefined offset: 0 in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 71
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Trying to get property of non-object in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 71
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Undefined offset: 1 in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 72
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Trying to get property of non-object in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 72
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Undefined offset: 0 in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 71
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Trying to get property of non-object in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 71
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Undefined offset: 1 in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 72
[10-Mar-2018 18:29:57 Europe/Berlin] PHP Notice:  Trying to get property of non-object in /Applications/MAMP/htdocs/joomla40/layouts/joomla/form/field/radio.php on line 72
avatar infograf768 infograf768 - open - 10 Mar 2018
avatar joomla-cms-bot joomla-cms-bot - change - 10 Mar 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Mar 2018
avatar infograf768
infograf768 - comment - 10 Mar 2018

If I first test for $options, I do not get the Notice.
I.e.

		<?php if (!empty($options)) : ?>
			off-text="<?php echo $options[0]->text; ?>"
			on-text="<?php echo $options[1]->text; ?>"
			<?php echo $disabled ? 'disabled' : '';?>>
		<?php endif; ?>
avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Mar 2018
Category com_content
avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Mar 2018
Build staging 4.0-dev
avatar Quy
Quy - comment - 10 Mar 2018

The affected settings:

		<joomla-field-switcher
		id="jform_list_show_votes"
				off-text="<br />
<b>Notice</b>:  Undefined offset: 0 in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>71</b><br />
<br />
<b>Notice</b>:  Trying to get property 'text' of non-object in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>71</b><br />
"
		on-text="<br />
<b>Notice</b>:  Undefined offset: 1 in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>72</b><br />
<br />
<b>Notice</b>:  Trying to get property 'text' of non-object in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>72</b><br />
"
		>
		<joomla-field-switcher
		id="jform_list_show_ratings"
				off-text="<br />
<b>Notice</b>:  Undefined offset: 0 in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>71</b><br />
<br />
<b>Notice</b>:  Trying to get property 'text' of non-object in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>71</b><br />
"
		on-text="<br />
<b>Notice</b>:  Undefined offset: 1 in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>72</b><br />
<br />
<b>Notice</b>:  Trying to get property 'text' of non-object in <b>C:\xampp\htdocs\joomla4\layouts\joomla\form\field\radio.php</b> on line <b>72</b><br />
"
		>
avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Mar 2018
Status New Discussion
avatar C-Lodder
C-Lodder - comment - 10 Mar 2018

Please test with: #19296

avatar Quy
Quy - comment - 11 Mar 2018

I no longer get the notices after the merged of #19296.

avatar infograf768 infograf768 - change - 11 Mar 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-03-11 16:59:43
Closed_By infograf768
avatar infograf768
infograf768 - comment - 11 Mar 2018

Indeed. Let's close it

avatar infograf768 infograf768 - close - 11 Mar 2018

Add a Comment

Login with GitHub to post a comment