# Fix for duplicate magic methods calls (bug #63462)

- Thread: https://externals.io/message/64924
- Original archive: https://news-web.php.net/php.internals/64924
- Started by Stas Malyshev on 2013-01-14T08:20:10+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #64924 — Stas Malyshev — 2013-01-14T08:20:10+00:00

URL: https://externals.io/message/64924#64924

Hi!

I made a fix for bug #63462 - https://github.com/php/php-src/pull/258 -
which changes a bit how we do guards by unmangling the names before
applying guards. This is a slight change of behavior and also means that
all private vars with the same name would use the same guard (all
protected and public vars with the same name are the same var anyway, so
they should be doing it in any case).
Since it's a behavior change in core, I'd appreciate a second pair of
eyes to see if nothing is broken by it. All tests pass but better safe
then sorry. If no problems found in it, I'll commit it soon.

Thanks,
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #64936 — Dmitry Stogov — 2013-01-14T16:36:42+00:00

URL: https://externals.io/message/64924#64936 · In reply to: #64924

Hi Stas,

Sorry for delay, I'll able to take a look only tomorrow or after tomorrow.

Thanks. Dmitry.



> Hi!
>
> I made a fix for bug #63462 - https://github.com/php/php-src/pull/258 -
> which changes a bit how we do guards by unmangling the names before
> applying guards. This is a slight change of behavior and also means that
> all private vars with the same name would use the same guard (all
> protected and public vars with the same name are the same var anyway, so
> they should be doing it in any case).
> Since it's a behavior change in core, I'd appreciate a second pair of
> eyes to see if nothing is broken by it. All tests pass but better safe
> then sorry. If no problems found in it, I'll commit it soon.
>
> Thanks,
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227

---

## #64993 — Dmitry Stogov — 2013-01-16T08:57:06+00:00

URL: https://externals.io/message/64924#64993 · In reply to: #64924

Hi Stas,

I think the patch is correct and should be committed into 5.3 and above.

Thanks. Dmitry.

On Mon, Jan 14, 2013 at 12:20 PM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:

> Hi!
>
> I made a fix for bug #63462 - https://github.com/php/php-src/pull/258 -
> which changes a bit how we do guards by unmangling the names before
> applying guards. This is a slight change of behavior and also means that
> all private vars with the same name would use the same guard (all
> protected and public vars with the same name are the same var anyway, so
> they should be doing it in any case).
> Since it's a behavior change in core, I'd appreciate a second pair of
> eyes to see if nothing is broken by it. All tests pass but better safe
> then sorry. If no problems found in it, I'll commit it soon.
>
> Thanks,
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
