Advertisement:

Author Topic: A non-numeric value encountered  (Read 887 times)

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
A non-numeric value encountered
« on: April 25, 2019, 03:07:31 PM »
ManagePermissions.php PHP 7.1 SMF 2.0.15, SMF 2.1

$context['groups'][(int) $row['id_group']]['num_permissions'][empty($row['add_deny']) ? 'denied' : 'allowed'] += $row['num_permissions']

Plz, write me fast fix..

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,065
  • Gender: Male
    • Kindred-999 on GitHub
Re: A non-numeric value encountered
« Reply #1 on: April 25, 2019, 11:16:56 PM »
Your post is not comprehensible
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,972
    • StoryBB/StoryBB on GitHub
Re: A non-numeric value encountered
« Reply #2 on: April 26, 2019, 01:27:31 AM »
Is that all of the error message? Which version of 2.1? What mods are installed?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #3 on: April 26, 2019, 06:56:35 AM »
Your post is not comprehensible

This code $context['groups'][(int) $row['id_group']]['num_permissions'][empty($row['add_deny']) ? 'denied' : 'allowed'] += $row['num_permissions'] not compatible PHP 7.1 Error A non-numeric value encountered

How to fix compatibility with PHP 7.1? How to fix the error? Maybe so? $context['groups'][(int) $row['id_group']]['num_permissions'][empty($row['add_deny']) ? 'denied' : 'allowed'] += (int)$row['num_permissions']

Programmers help correct the error ))


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,972
    • StoryBB/StoryBB on GitHub
Re: A non-numeric value encountered
« Reply #4 on: April 26, 2019, 07:03:50 AM »
Which is why I asked the other questions because we have users using SMF 2.0 on 7.1, and SMF 2.1 on 7.2 and even 7.3 who don’t have this problem, so what is different about yours?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #5 on: April 26, 2019, 07:15:03 AM »
Which is why I asked the other questions because we have users using SMF 2.0 on 7.1, and SMF 2.1 on 7.2 and even 7.3 who don’t have this problem, so what is different about yours?
This error occurs only when changing the user group.
I don't know which users you have, but I have this error in PHP 7.1.
This is the easiest fix for a programmer.
If you can't help, don't fool my head.

Offline SychO

  • Customizer
  • Sophist Member
  • *
  • Posts: 1,192
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: A non-numeric value encountered
« Reply #6 on: April 26, 2019, 07:16:15 AM »
lol :P

what is your SMF Version ?

Imazighen

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #7 on: April 26, 2019, 07:21:22 AM »
lol :P

what is your SMF Version ?
This code have SMF 2.0.15 and SMF 2.1 in ManagePermissions.php

Offline SychO

  • Customizer
  • Sophist Member
  • *
  • Posts: 1,192
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: A non-numeric value encountered
« Reply #8 on: April 26, 2019, 07:22:13 AM »
okay, but what version are YOU using ?

Imazighen

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #9 on: April 26, 2019, 07:27:13 AM »
okay, but what version are YOU using ?
It doesn’t matter because this code is in SMF 2.0.X and 2.1.X.
The file ManagePermissions.php is almost the same in all versions.

Offline SychO

  • Customizer
  • Sophist Member
  • *
  • Posts: 1,192
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: A non-numeric value encountered
« Reply #10 on: April 26, 2019, 07:28:35 AM »
Well I suppose you'd know better then.

Imazighen

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #11 on: April 26, 2019, 07:37:09 AM »
Well I suppose you'd know better then.
OK. See …
« Last Edit: April 26, 2019, 08:22:11 AM by delysid »

Offline SychO

  • Customizer
  • Sophist Member
  • *
  • Posts: 1,192
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: A non-numeric value encountered
« Reply #12 on: April 26, 2019, 07:40:35 AM »
I see you removed the SMF copyright line and my copyright line from the theme I made

Imazighen

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #13 on: April 26, 2019, 07:55:02 AM »
I see you removed the SMF copyright line and my copyright line from the theme I made
There is a small part of your theme. This is a completely reworked topic for me, in which there are no errors.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,972
    • StoryBB/StoryBB on GitHub
Re: A non-numeric value encountered
« Reply #14 on: April 26, 2019, 08:50:00 AM »
Removing the copyright means no support.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline SychO

  • Customizer
  • Sophist Member
  • *
  • Posts: 1,192
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: A non-numeric value encountered
« Reply #15 on: April 26, 2019, 08:57:43 AM »
There is a small part of your theme. This is a completely reworked topic for me, in which there are no errors.

It's not a small part, it's the entire theme with small color edits, and even if you edited all of it, the license still doesn't allow you to remove the copyright notice.

oh well, waste of time.

Imazighen

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #16 on: April 26, 2019, 09:00:19 AM »
Removing the copyright means no support.
Nobody deleted anything.
Who are you to draw your own conclusions?
You bark like a dog.
This is a question for programmers how best to fix the code.
And then the trolls ran up to the topic.

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #17 on: April 26, 2019, 09:08:31 AM »
There is a small part of your theme. This is a completely reworked topic for me, in which there are no errors.
It's not a small part, it's the entire theme with small color edits, and even if you edited all of it, the license still doesn't allow you to remove the copyright notice.
oh well, waste of time.
The "Thema" is not yours, there is no mention of you in the scripts. Not deleted and not changed who made the forum.
For Seo, removed links to third-party sites.
No license is violated.
To talk about licenses you need to know who the license can affect.

Offline Sesquipedalian

  • The Mad Doctor
  • Lead Developer
  • Sr. Member
  • *
  • Posts: 806
  • Gender: Male
  • It works! ... in theory.
    • Sesquipedalian on GitHub
Re: A non-numeric value encountered
« Reply #18 on: April 26, 2019, 09:21:14 AM »
delysid, I am one of the developers. You apparently believe that you gave us all the information we need. You are wrong about that. Your refusal to answer even basic questions made it impossible for us to help you further. Then one of us noticed that you have removed both the SMF copyright (which you are legally allowed to do, but which disqualifies you from receiving support) and the copyright for a theme you installed (which you are not legally allowed to do, even if you modified it, without permission from the theme's author). You are not being trolled. You are the one behaving like a troll.

If you want help, you need to fix the copyright issues on your forum and then answer the questions you are asked. You should also consider apologizing to the people you have been rude to here. They are volunteers who offer help to people like you in their own free time and at their own discretion. If you want people to voluntarily help you, it is best not to alienate them.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Offline delysid

  • Semi-Newbie
  • *
  • Posts: 10
Re: A non-numeric value encountered
« Reply #19 on: April 26, 2019, 09:39:12 AM »
delysid, I am one of the developers. You apparently believe that you gave us all the information we need. You are wrong about that. Your refusal to answer even basic questions made it impossible for us to help you further. Then one of us noticed that you have removed both the SMF copyright (which you are legally allowed to do, but which disqualifies you from receiving support) and the copyright for a theme you installed (which you are not legally allowed to do, even if you modified it, without permission from the theme's author). You are not being trolled. You are the one behaving like a troll.

If you want help, you need to fix the copyright issues on your forum and then answer the questions you are asked. You should also consider apologizing to the people you have been rude to here. They are volunteers who offer help to people like you in their own free time and at their own discretion. If you want people to voluntarily help you, it is best not to alienate them.

Lies for lies
Nothing was deleted.
The "Thema" is not his but made from the same sources.
No license was removed and used mod hide SMF version for Guest.
All who made the forum and participated in the development of the forum are not changed.

Plz delete this topic or close. Good luck
« Last Edit: April 26, 2019, 09:50:30 AM by delysid »