summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2008-10-15 16:08:59 +0000
committerUrban Müller2008-10-15 16:08:59 +0000
commit5db02f8d8ced2403e69a4901a0a15386d19a13b5 (patch)
tree1b022b87e1e80191809cd338f356e510fe012744
parent2a4b5c0e971f9ed3056b2d81b639dad0fd069b62 (diff)
downloaditools-5db02f8d8ced2403e69a4901a0a15386d19a13b5.tar.gz
itools-5db02f8d8ced2403e69a4901a0a15386d19a13b5.tar.bz2
itools-5db02f8d8ced2403e69a4901a0a15386d19a13b5.zip
phplint cleanup
-rw-r--r--auto_prepend.php4
-rw-r--r--it_auto_prepend.php7
-rw-r--r--it_dbi.class6
-rw-r--r--it_syntaxconverter.class1
4 files changed, 6 insertions, 12 deletions
diff --git a/auto_prepend.php b/auto_prepend.php
index 6bcd03c..f1ecba2 100644
--- a/auto_prepend.php
+++ b/auto_prepend.php
@@ -187,8 +187,8 @@ else
define('TC_SELF', 0);
define('TC_ALL', 0);
define('TC_NONE', 0);
- function it_untaint($value, $marks = 0) { return $value; }
- function it_taintcheck($value, $marks = 0) { return $value; }
+ function it_untaint($value, $dummy_marks = 0) { return $value; }
+ function it_taintcheck($value, $dummy_marks = 0) { return $value; }
}
# ULTRAHOME is generated in a safe way
diff --git a/it_auto_prepend.php b/it_auto_prepend.php
index 45ad41d..d683116 100644
--- a/it_auto_prepend.php
+++ b/it_auto_prepend.php
@@ -53,7 +53,7 @@ function it_initialize()
@set_error_handler("it_errorhandler", E_USER_ERROR | E_RECOVERABLE_ERROR | E_WARNING | E_USER_WARNING | E_NOTICE | E_USER_NOTICE);
error_reporting($error_reporting); # Restore user setting once we installed error handler
- if ($autoloader = function_exists('spl_autoload_register') && spl_autoload_register('it_classloader'))
+ if (function_exists('spl_autoload_register') && spl_autoload_register('it_classloader'))
{
ini_set('include_path', $it_path . PATH_SEPARATOR . $include_path);
require_once("$it_path/auto_prepend.php");
@@ -113,11 +113,6 @@ function it_initialize()
{
# Convert syntax (we will return name of converted script to global context to start it there)
$result = it_convert(it_untaint($_SERVER['SCRIPT_FILENAME'], TC_SELF));
-
- /* XXX Disabled as DB not always there
- if (!$autoloader) # PHP 4 fallback
- it_dbi::createclasses();
- */
}
}
diff --git a/it_dbi.class b/it_dbi.class
index c85b43f..6ce5808 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -146,7 +146,7 @@ function createclass($p)
$interface = function_exists("interface_exists") && interface_exists("Iterator", false) ? "implements Iterator" : "";
$code = "class $classname extends it_dbi $interface
{
- function $classname(/* $query ... */)
+ function $classname(/* \$query ... */)
{
\$args = func_get_args();
\$query = array_shift(\$args); # Preserve type (scalar/array) in single parameter case
@@ -332,7 +332,7 @@ function _fatal($text)
{
$text = get_class($this).'::'.$text;
- if ($this->_link && ($errno = mysql_errno($this->_link)) && ($errstr = mysql_error($this->_link)))
+ if ($this->_link && ($errstr = mysql_error($this->_link)))
$text = "\"$errstr\" in $text";
if ($this->_link && ($res = @mysql_fetch_row(mysql_query('select database()', $this->_link)))) # dont create extra errs
@@ -357,7 +357,7 @@ function _read_post_process()
* This is a stub-function that can be overloaded.
* @param $tags Reference to update/create tags, can be modified as needed
*/
-function _write_pre_process(&$tags)
+function _write_pre_process(/* &$tags */)
{
}
diff --git a/it_syntaxconverter.class b/it_syntaxconverter.class
index ef0b5f3..f37b60d 100644
--- a/it_syntaxconverter.class
+++ b/it_syntaxconverter.class
@@ -358,7 +358,6 @@ function has_double_arrow($element)
function make_array($namedparams)
{
$result = array();
- $head = array();
$body = array();
$this->changes++;