@@ -114,7 +114,7 @@ static inline PHPTidyObj *php_tidy_fetch_object(zend_object *obj) {
114
114
/* }}} */
115
115
116
116
/* {{{ ext/tidy prototypes */
117
- static zend_string * php_tidy_file_to_mem (const char * , bool );
117
+ static zend_string * php_tidy_file_to_mem (const zend_string * , bool );
118
118
static void tidy_object_free_storage (zend_object * );
119
119
static zend_object * tidy_object_new_node (zend_class_entry * );
120
120
static zend_object * tidy_object_new_doc (zend_class_entry * );
@@ -246,7 +246,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, bool is_file)
246
246
Z_PARAM_BOOL (use_include_path )
247
247
ZEND_PARSE_PARAMETERS_END ();
248
248
249
- if (!(data = php_tidy_file_to_mem (ZSTR_VAL ( arg1 ) , use_include_path ))) {
249
+ if (!(data = php_tidy_file_to_mem (arg1 , use_include_path ))) {
250
250
RETURN_FALSE ;
251
251
}
252
252
} else {
@@ -328,12 +328,12 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, bool is_file)
328
328
tidyRelease (doc );
329
329
}
330
330
331
- static zend_string * php_tidy_file_to_mem (const char * filename , bool use_include_path )
331
+ static zend_string * php_tidy_file_to_mem (const zend_string * filename , bool use_include_path )
332
332
{
333
333
php_stream * stream ;
334
334
zend_string * data = NULL ;
335
335
336
- if (!(stream = php_stream_open_wrapper (filename , "rb" , (use_include_path ? USE_PATH : 0 ), NULL ))) {
336
+ if (!(stream = php_stream_open_wrapper (ZSTR_VAL ( filename ) , "rb" , (use_include_path ? USE_PATH : 0 ), NULL ))) {
337
337
return NULL ;
338
338
}
339
339
if ((data = php_stream_copy_to_mem (stream , PHP_STREAM_COPY_ALL , 0 )) == NULL ) {
@@ -1050,7 +1050,7 @@ PHP_FUNCTION(tidy_parse_file)
1050
1050
Z_PARAM_BOOL (use_include_path )
1051
1051
ZEND_PARSE_PARAMETERS_END ();
1052
1052
1053
- if (!(contents = php_tidy_file_to_mem (ZSTR_VAL ( inputfile ) , use_include_path ))) {
1053
+ if (!(contents = php_tidy_file_to_mem (inputfile , use_include_path ))) {
1054
1054
php_error_docref (NULL , E_WARNING , "Cannot load \"%s\" into memory%s" , ZSTR_VAL (inputfile ), (use_include_path ) ? " (using include path)" : "" );
1055
1055
RETURN_FALSE ;
1056
1056
}
@@ -1330,7 +1330,7 @@ PHP_METHOD(tidy, __construct)
1330
1330
obj = Z_TIDY_P (ZEND_THIS );
1331
1331
1332
1332
if (inputfile ) {
1333
- if (!(contents = php_tidy_file_to_mem (ZSTR_VAL ( inputfile ) , use_include_path ))) {
1333
+ if (!(contents = php_tidy_file_to_mem (inputfile , use_include_path ))) {
1334
1334
zend_throw_error (zend_ce_exception , "Cannot load \"%s\" into memory%s" , ZSTR_VAL (inputfile ), (use_include_path ) ? " (using include path)" : "" );
1335
1335
RETURN_THROWS ();
1336
1336
}
@@ -1375,7 +1375,7 @@ PHP_METHOD(tidy, parseFile)
1375
1375
1376
1376
obj = Z_TIDY_P (ZEND_THIS );
1377
1377
1378
- if (!(contents = php_tidy_file_to_mem (ZSTR_VAL ( inputfile ) , use_include_path ))) {
1378
+ if (!(contents = php_tidy_file_to_mem (inputfile , use_include_path ))) {
1379
1379
php_error_docref (NULL , E_WARNING , "Cannot load \"%s\" into memory%s" , ZSTR_VAL (inputfile ), (use_include_path ) ? " (using include path)" : "" );
1380
1380
RETURN_FALSE ;
1381
1381
}
0 commit comments