Advertisement:

Author Topic: $smcFunc defined twice as global  (Read 1086 times)

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 141
    • generalcartalk.com
$smcFunc defined twice as global
« on: March 04, 2018, 08:42:25 AM »
Hello,

The $smcFunc var is being defined twice as global in the Register.php file.

Code: [Select]
// Begin the registration process.
function Register($reg_errors = array())
{
global $txt, $boarddir, $context, $settings, $modSettings, $user_info;
global $language, $scripturl, $smcFunc, $sourcedir, $smcFunc, $cur_profile;
« Last Edit: July 22, 2018, 09:55:42 AM by Gwenwyfar »
It's fast, it's furious, it's generalcartalk.com

Check out my mods

Offline albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 316
Re: $smcFunc defined twice as global
« Reply #1 on: March 04, 2018, 09:19:17 AM »
In smf 2.1 this issue didn't exists,
maybe got already fixed.

Online d3vcho(void)

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 2,752
  • Gender: Male
    • d3vcho on GitHub
Re: $smcFunc defined twice as global
« Reply #2 on: March 04, 2018, 09:27:39 AM »
Yes, it was fixed by Arantor a long time ago for SMF 2.1 but it's still there for 2.0.x. I'll pass it to the developers.

Thank you.
"Demons are like obedient dogs; they come when they're called"

d3vcho(void)

Offline Sh@mbles

  • SMF Hero
  • ******
  • Posts: 4,853
  • Gender: Male
    • i30 Owners Club
Re: $smcFunc defined twice as global
« Reply #3 on: March 04, 2018, 09:34:15 AM »
I wouldn't class this as a bug since it doesn't cause incorrect or unexpected results, or for Register.php to behave in unintended ways.

Just sayin'

Online d3vcho(void)

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 2,752
  • Gender: Male
    • d3vcho on GitHub
Re: $smcFunc defined twice as global
« Reply #4 on: March 04, 2018, 09:37:14 AM »
Nope it's not a bug, it's just repeated code that should be removed. But it's better to keep it here so we don't forget about it.
"Demons are like obedient dogs; they come when they're called"

d3vcho(void)

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 141
    • generalcartalk.com
Re: $smcFunc defined twice as global
« Reply #5 on: March 04, 2018, 01:54:30 PM »
Indeed, it is not really a bug per se. But I did not know where else to post it. And yes, it appears that in the 2.1. version it has been fixed.
It's fast, it's furious, it's generalcartalk.com

Check out my mods