Jump to content
  • 0

donate system error HELP


Question

Posted
Fatal error: Cannot use 'String' as class name as it is reserved in /home/fr2com/domains/freya-l2.com/public_html/donate/vendor/String.php on line 7

This error comes when trying to install donate system?? Please help.

 

 

<?php



namespace Donate\Vendor;



if ( ! defined('STARTED')) exit;



class String {

	public static function truncate($string, $length = 50, $append="..") {

		$string = trim($string);



		if(strlen($string) > $length) {

		    $string = wordwrap($string, $length);

		    $string = explode("\n", $string, 2);

		    $string = $string[0] . $append;

		}



		return $string;

	}

}

 

2 answers to this question

Recommended Posts

  • 0
Posted

In php7 class name String cant be used as a class and file...you can take a look in stackoverflow forums there maybe will be your answer..here is l2jsection

  • 0
Posted

class String, you have to rename it. Guess error is clear and even one Google search would give you the answer. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...