-
Notifications
You must be signed in to change notification settings - Fork 144
/
Copy pathError.php
40 lines (34 loc) · 1.1 KB
/
Error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
require_once 'Generic.php';
/**
* Converter: mysql_error, mysql_errno.
*
* @category Functions
*
* @author Andrey Hristov <andrey@php.net>, Ulf Wendel <ulf.wendel@phpdoc.de>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
*
* @version CVS: $Id:$, Release: @package_version@
*
* @link http://www.mysql.com
* @since Class available since Release 1.0
*/
class MySQLConverterTool_Function_Error extends MySQLConverterTool_Function_Generic
{
public function handle(array $params = array())
{
if (count($params) > 1) {
return array(self::PARSE_ERROR_WRONG_PARAMS, null);
}
@list($conn) = $this->extractParamValues($params);
if (is_null($conn)) {
$conn = $this->ston_name;
}
return array(null, sprintf('%s(%s)', $this->new_name, $conn));
}
public function getConversionHint()
{
return 'mysql_error()/mysql_errno() do not require a connection handle. A default connection has to be made before. ';
}
}