PHP

[PHP] Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the ..

은둔한량 2023. 9. 11. 16:15
반응형

Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

/system/libraries/Session/drivers/Session_driver.php

#[\ReturnTypeWillChange]
public function open($save_path, $name)
{
   ...
}

#[\ReturnTypeWillChange]
public function read($session_id)
{
  ...
}

#[\ReturnTypeWillChange]
public function write($session_id, $session_data)
{
  ...
}

#[\ReturnTypeWillChange]
public function close()
{
  ...
}

#[\ReturnTypeWillChange]
public function destroy($session_id)
{
  ...
}

#[\ReturnTypeWillChange]
public function gc($maxlifetime)
{
  ...
}

#[\ReturnTypeWillChange]  들만 넣어 주면 에러가 나지 않는다.

 

반응형