@@ -1780,7 +1780,6 @@ PHP_FUNCTION(pg_fetch_result)
1780
1780
}
1781
1781
if (field_name ) {
1782
1782
field_offset = PQfnumber (pgsql_result , ZSTR_VAL (field_name ));
1783
- // TODO Split into 2 and ValueError for negative index?
1784
1783
if (field_offset < 0 || field_offset >= PQnfields (pgsql_result )) {
1785
1784
php_error_docref (NULL , E_WARNING , "Bad column offset specified" );
1786
1785
RETURN_FALSE ;
@@ -2120,7 +2119,6 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
2120
2119
pg_result -> row = 0 ;
2121
2120
}
2122
2121
pgsql_row = pg_result -> row ;
2123
- // TODO Split into 2 and ValueError for negative index?
2124
2122
if (pgsql_row < 0 || pgsql_row >= PQntuples (pgsql_result )) {
2125
2123
RETURN_FALSE ;
2126
2124
}
@@ -2139,7 +2137,6 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
2139
2137
2140
2138
if (field_name ) {
2141
2139
field_offset = PQfnumber (pgsql_result , ZSTR_VAL (field_name ));
2142
- // TODO Split into 2 and ValueError for negative index?
2143
2140
if (field_offset < 0 || field_offset >= PQnfields (pgsql_result )) {
2144
2141
php_error_docref (NULL , E_WARNING , "Bad column offset specified" );
2145
2142
RETURN_FALSE ;
@@ -2849,7 +2846,6 @@ PHP_FUNCTION(pg_lo_seek)
2849
2846
if (zend_parse_parameters (argc , "rl|l" , & pgsql_id , & offset , & whence ) == FAILURE ) {
2850
2847
RETURN_THROWS ();
2851
2848
}
2852
- /* TODO Error for < 0 offset? */
2853
2849
if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END ) {
2854
2850
zend_argument_value_error (3 , "must be one of PGSQL_SEEK_SET, PGSQL_SEEK_CUR, or PGSQL_SEEK_END" );
2855
2851
RETURN_THROWS ();
@@ -3386,7 +3382,6 @@ PHP_FUNCTION(pg_unescape_bytea)
3386
3382
to = estrndup (tmp , to_len );
3387
3383
PQfreemem (tmp );
3388
3384
if (!to ) {
3389
- /* TODO Promote to Error? */
3390
3385
php_error_docref (NULL , E_WARNING ,"Invalid parameter" );
3391
3386
RETURN_FALSE ;
3392
3387
}
0 commit comments