php - How to remove last value in an from an object in php
问题描述
I am trying to make a more secure login process for my new website, I am using the MVC model in PHP, so this is a snippet of the code
$userData = $app->UserDetails($user_id);
$_SESSION['loggedin'] = TRUE;
array_pop($userData);
$_SESSION['userData'] = $userData;
$_SESSION['user_id'] = $user_id; // Set Session
$app is actually an object that I created and here is the error that occurs when I try to login, can anyone help me please
Warning: array_pop() expects parameter 1 to be array, object given in C:\xampp\htdocs\ibuy_e-commerce\accounts\index.php
解决方案
推荐阅读
- python - How do you view the active Conda environment in VSCode?
- ios - Swift 中是否有一些东西可以解码 html 或者我应该坚持使用依赖项?
- html - Xhtml 验证器错误“非保留名称”
- android - kundli 应用程序的自定义用户界面
- php - 使用 PHP 从保存在本地的 GeoIP 数据库中获取数据
- ios - 应用程序在 UIActivityViewController 上呈现时崩溃
- apache-tika - Apache Tika:在 tika-server 上为 opennlp 模型设置类路径
- jquery - Bootstrap Popover: Hover/Click and Close on Outside Click, but Revert to Hover Mode
- matlab - fftshift on a 3D matrix on GPU
- python - 将大量数据拟合到 GMM 时如何解决 sklearn 中的 MemoryError?