cvs: php-gcov-web /cron check_parameters.php

From: Date: Sun, 07 Sep 2008 17:54:53 +0000
Subject: cvs: php-gcov-web /cron check_parameters.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-2607@lists.php.net to get a copy of this message
felipe		Sun Sep  7 17:54:53 2008 UTC

  Modified files:              
    /php-gcov-web/cron	check_parameters.php 
  Log:
  - Fixed version check for '+' and '-' (>= 5.3)
  - Added SPL_* and ZIPARCHIVE_* to work like PHP_*_FUNCTION|METHOD
  
  
http://cvs.php.net/viewvc.cgi/php-gcov-web/cron/check_parameters.php?r1=1.5&r2=1.6&diff_format=u
Index: php-gcov-web/cron/check_parameters.php
diff -u php-gcov-web/cron/check_parameters.php:1.5 php-gcov-web/cron/check_parameters.php:1.6
--- php-gcov-web/cron/check_parameters.php:1.5	Wed Aug  6 19:21:50 2008
+++ php-gcov-web/cron/check_parameters.php	Sun Sep  7 17:54:53 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: check_parameters.php,v 1.5 2008/08/06 19:21:50 nlopess Exp $ */
+/* $Id: check_parameters.php,v 1.6 2008/09/07 17:54:53 felipe Exp $ */
 
 // check for zend_parse_parameters*() and related functions usage
 // TODO: add support for zend_get_parameters*()
@@ -260,7 +260,7 @@
 
 					case '+':
 					case '*':
-						if (version_compare(VERSION, '6', 'ge')) {
+						if (version_compare(VERSION, '5.3', 'ge')) {
 							if ($varargs) {
 								error("A varargs specifier can only be used once. repeated char at column $i");
 							} else {
@@ -311,7 +311,7 @@
 		$txt = preg_replace(array('@//.*@S', '@/\*.*\*/@SsUe'), array('',
'preg_replace("/[^\r\n]+/S", "", \'$0\')'), $txt);
 
 
-		$split = preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S',
$txt, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
+		$split =
preg_split('/(?:PHP|SPL|ZIPARCHIVE)_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S',
$txt, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
 
 		if (count($split) < 2) continue; // no functions defined on this file
 		array_shift($split); // the first part isn't relevant




Thread (1 message)

  • Felipe Pena
« previous php.webmaster (#2607) next »