fixed a wrong type in svn_blame in svn.c
added null check in code_folder.php
This commit is contained in:
		| @ -1486,7 +1486,7 @@ PHP_FUNCTION(svn_diff) | ||||
| 	apr_pool_t *subpool; | ||||
| 	apr_file_t *outfile = NULL, *errfile = NULL; | ||||
| 	svn_error_t *err; | ||||
| 	char *path1, *path2; | ||||
| 	const char *path1, *path2; | ||||
| 	const char *utf8_path1 = NULL,*utf8_path2 = NULL; | ||||
| 	const char *can_path1 = NULL,*can_path2 = NULL; | ||||
| 	psvn_size_t path1len, path2len; | ||||
| @ -2725,7 +2725,7 @@ PHP_FUNCTION(svn_blame) | ||||
| 	const char *repos_url = NULL; | ||||
| 	const char *utf8_repos_url = NULL; | ||||
| 	psvn_size_t repos_url_len; | ||||
| 	int revision = -1; | ||||
| 	long revision = -1; | ||||
| 	svn_error_t *err; | ||||
| 	svn_opt_revision_t | ||||
| 			start_revision = { 0 }, | ||||
|  | ||||
| @ -261,7 +261,7 @@ $this->load->view ( | ||||
| 		</div> | ||||
|  | ||||
| 		<?php | ||||
| 		if (array_key_exists('properties', $file) && count($file['properties']) > 0) | ||||
| 		if (array_key_exists('properties', $file) && !is_null($file['properties']) && count($file['properties']) > 0) | ||||
| 		{ | ||||
| 			print '<ul id="code_blame_property_list">'; | ||||
| 			foreach ($file['properties'] as $pn => $pv) | ||||
| @ -369,7 +369,7 @@ $this->load->view ( | ||||
| 	printf ('<code class="codepot-line-numbered-code prettyprint %s %s" id="code_blame_result_code">', $prettyprint_linenums, $prettyprint_lang); | ||||
|  | ||||
| 	$charset = ''; | ||||
| 	if (array_key_exists('properties', $file) && count($file['properties']) > 0) | ||||
| 	if (array_key_exists('properties', $file) && !is_null($file['properties']) && count($file['properties']) > 0) | ||||
| 	{ | ||||
| 		$p = &$file['properties']; | ||||
| 		if (array_key_exists('svn:mime-type', $p)) | ||||
|  | ||||
| @ -1236,7 +1236,7 @@ $this->load->view ( | ||||
| 		</div> | ||||
|  | ||||
| 		<?php | ||||
| 		if (array_key_exists('properties', $file) && count($file['properties']) > 0) | ||||
| 		if (array_key_exists('properties', $file) && !is_null($file['properties']) && count($file['properties']) > 0) | ||||
| 		{ | ||||
| 			print '<div><ul id="code_folder_property_list">'; | ||||
| 			foreach ($file['properties'] as $pn => $pv) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user