Re: com web/bugs: Fix bug #68405 (The PHP versiondropdowndoesn't show PHP versions after a form error): include/functions.php www/report.php

From: Date: Sat, 29 Nov 2014 15:46:24 +0000
Subject: Re: com web/bugs: Fix bug #68405 (The PHP versiondropdowndoesn't show PHP versions after a form error): include/functions.php www/report.php
References: 1 2 3  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-20310@lists.php.net to get a copy of this message
W dniu 2014-11-29 16:37, Maciej Sobaczewski pisze:
W dniu 2014-11-29 08:19, Hannes Magnusson pisze:
On Fri, Nov 28, 2014 at 10:14 PM, <sobak@php.net> wrote:
Commit:    41ddbc8f0568eb6be46c065897d5c7465d2cad82
Author:    Sobak <msobaczewski@gmail.com>         Sat, 29 Nov 2014
07:14:15 +0100 Parents: fd9f82d0fb52153cee81727fb9ca47235235af2d Branches: master Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=41ddbc8f0568eb6be46c065897d5c7465d2cad82 Log: Fix bug #68405 (The PHP version dropdown doesn't show PHP versions after a form error) require_once caused a problem here, so file needs to be included earlier and reused by those two functions <http://www.php.net/unsub.php>
Or... Rather then adding more globals... Drop the _once ? Let individual functions that need that list include the file :] -Hannes
Hello Hannes, I'm also not in favor of globals, but php_versions.php declares new function and including this file twice causes an error (redeclaration of function). Probably the best idea would be to pass $versions using parameter, but it would introduce inconsistency. I'm not happy with my solution and totally open for better ideas :) Cheers, Maciej.
Another option would be, obviously, to place buildVersions() in if (function_exists(...)) block, but it seems like treating synptoms instead of causes.

« previous php.webmaster (#20310) next »