Phalcon Debug
v5.20.3
TypeError

Actiage\Front\Controller\Appointment\AppointmentsViewGetController::setReviews(): Argument #1 ($consultId) must be of type string, null given, called in /var/www/html/actiage/releases/20260914094743/src/front/Controller/Appointment/AppointmentsViewGetController.php on line 69

/var/www/html/actiage/releases/20260914094743/src/front/Controller/Appointment/AppointmentsViewGetController.php : 109 |PHP 8.3.27
#0 Actiage\Front\Controller\Appointment\AppointmentsViewGetController->setReviewsapp
/var/www/html/actiage/releases/20260914094743/src/front/Controller/Appointment/AppointmentsViewGetController.php : 69
1<?php
2
3namespace Actiage\Front\Controller\Appointment;
4
5use Actiage\Front\Controller\BaseController;
6use Actiage\Shared\Infrastructure\Modules\ConsultsAppointments\ConsultsAppointmentsGetBySlug;
7use Actiage\Shared\Lib\Utils\Cookie;
8use Actiage\Shared\Lib\Utils\Country;
9use Actiage\Shared\Lib\Utils\Genders;
10use Actiage\Shared\Lib\Utils\Language;
11use Actiage\Shared\Lib\Utils\Secure;
12use Actiage\Shared\Models\ConsultasCitas;
13use Actiage\Shared\Models\ConsultasUsuariosReviews;
14use Actiage\Shared\Models\Paises;
15use Actiage\Shared\Models\Provincias;
16use Actiage\Shared\Models\Usuarios;
17use Phalcon\Html\Escaper;
18use Phalcon\Html\Helper\Input\Select;
19
20/**
21 * Class AppointmentsViewGetController
22 */
23final class AppointmentsViewGetController extends BaseController
24{
25
26 private $slug;
27 public function initialize()
28 {
29 $this->jsFiles = [
30 'js/shop/star-rating.js',
31 'js/country.js',
32 'js/general-consults.js'
33 ];
34 parent::initialize();
35 }
36 /**
37 * Vemos más a fondo el tipo de consulta que es
38 * @param string $slug
39 * @return void
40 */
41 public function viewAction(string $slug = '')
42 {
43 if (empty($slug)) {
44 $this->throw404();
45 }
46 $this->slug = $slug;
47 $this->view->userDataCompleted = $this->checkAllData();
48 if (!empty($this->user) && !$this->view->userDataCompleted) {
49 $this->setUserDataModal();
50 }
51 $consult = (new ConsultsAppointmentsGetBySlug())->get($slug)->toArray();
52
53 if (!$consult) {
54 $this->throw404();
55 }
56
57 $country = Cookie::getCountry();
58 if ($country == Country::UNITED_STATES) {
59 $path = Language::ENGLISH;
60 } elseif ($country == Country::SPAIN) {
61 $path = Language::SPANISH;
62 } else {
63 $path = Language::ENGLISH;
64 }
65 $this->view->appointmentPath = $path;
66 $this->view->consult = $consult;
67 $this->view->titleSeo = $consult[0]['ConsultasCitas']->nombre;
68 $this->view->descriptionSeo = $consult[0]['ConsultasCitas']->nombre;
69 $this->setReviews($consult[0]['ConsultasCitas']->id);
70 $this->view->classSpecialLayout = 'ficha-cita';
71 $countryCookie = Cookie::getCountryNav();
72 if ($countryCookie != Country::SPAIN) {
73 $this->view->urlCanonical = DOMINIO . str_replace('-' . $countryCookie, '', $_SERVER['REQUEST_URI']);
74 }
75 $this->view->language = Cookie::getLang();
76 $this->view->whatsapp = true;
77 $this->view->blank = true;
78 $this->view->containerDiv = '1s';
79 if ($slug !== 'consulta-de-50-minutos') {
80 $this->view->treatment = '-tratamiento';
81 } else {
82 $this->view->treatment = '';
83 }
84
85
86 $this->view->pick('appointment/view');
87 }
88
89 /**
90 * Comprobar que la url coincide con el pais
91 * @param string $slug
92 * @return void
93 */
94 private function checkUrlCountry(string $slug = '')
95 {
96 $country = Cookie::getCountryNav();
97 if ($country == Country::UNITED_STATES || $country == Country::ALL) {
98 $this->response->redirect('/en/anti-aging-medical-consultations/' . $slug)->send();
99 } elseif ($country == Country::SPAIN) {
100 $this->response->redirect('/es/consultas-medicas-antienvejecimiento/' . $slug)->send();
101 }
102 }
103
104 /**
105 * @param string $consultId
106 * @param string $source
107 * @return void
108 */
109 private function setReviews(string $consultId = '', string $source = ''): void
110 {
111 if (!empty($consultId)) {
112 $params['conditions'] = 'activo = 1 AND consultas_citas_id = ' . $consultId;
113 } elseif ($source == 'consultas') {
114 $params['conditions'] = 'activo = 1 AND consultas_citas_id IS NOT NULL';
115 } else {
116 $params['conditions'] = 'activo = 1';
117 }
118
119 $params['limit'] = '3';
120 $params['order'] = 'id DESC';
121 $this->view->reviews = ConsultasUsuariosReviews::find($params);
122 // $this->view->showFontAwesomeRating = true;
123
124 $paramsConsultas['conditions'] = 'activo = 1';
125 $paramsConsultas['order'] = 'orden';
126 $consults = ConsultasCitas::find($paramsConsultas);
127 $consultList = [];
128 foreach ($consults as $consult) {
129 $consultList[$consult->id] = $consult->nombre;
130 }
131 $this->view->consultNames = $consultList;
132 }
133
134 /**
135 * @return bool
136 */
137 private function checkAllData(): bool
138 {
139 if (empty($this->user['id'])) {
140 return true;
141 }
142 $user = Usuarios::findFirstById($this->user['id']);
143 if ($user) {
144
145 if (empty($user->nombre) || empty($user->apellidos) || empty($user->telefono)
146 || empty($user->pais_id)
147 || (empty($user->provincia_id) && $user->pais_id == Country::ESPANA)
148 || empty($user->fecha_nacimiento) || empty($user->dni) || empty($user->direccion)
149 || empty($user->cp) || empty($user->localidad)
150 || empty($user->genero_id)
151 ) {
152 return false;
153 }
154 }
155
156 return true;
157 }
158
159 private function setUserDataModal() {
160
161 $this->view->urlBack = Secure::encrypt('/consultas-medicas-antienvejecimiento/' . $this->slug);
162 $this->view->countries = Paises::find(['order' => 'nombre', 'conditions' => 'activo = 1']);
163 $this->view->selectInputCountries = new Select(new Escaper());
164 $this->view->selectInputStates = new Select(new Escaper());
165 $this->view->selectInputGenders = new Select(new Escaper());
166 $this->view->selectInputBirthDays = new Select(new Escaper());
167 $this->view->selectInputBirthMonths = new Select(new Escaper());
168 $this->view->selectInputBirthYears = new Select(new Escaper());
169 $this->view->birthDay = '';
170 $this->view->birthMonth = '';
171 $this->view->birthYear = '';
172
173 $errors = [];
174 $user = Usuarios::findFirst($this->user['id']);
175
176 if (empty($user->pais_id)) {
177 $this->view->states = Provincias::find(['conditions' => 'pais_id = ' . Country::ESPANA, 'order' => 'provincia']);
178 } else {
179 $this->view->states = Provincias::find(['conditions' => 'pais_id = ' . $user->pais_id, 'order' => 'provincia']);
180 }
181
182 if (!empty($user->fecha_nacimiento)) {
183 $date = explode('-', $user->fecha_nacimiento);
184 if (isset($date[2])) {
185 $this->view->birthDay = ltrim($date[2], '0') ?? '';
186 }
187 if (isset($date[1])) {
188 $this->view->birthMonth = ltrim($date[1], '0') ?? '';
189 }
190 if (isset($date[0])) {
191 $this->view->birthYear = $date[0] ?? '';
192 }
193 }
194 $this->view->birthDays = $this->CalendarPlugin->getDays();
195 $this->view->birthMonths = $this->CalendarPlugin->getMonths();
196 $this->view->birthYears = $this->CalendarPlugin->getYears();
197 if (empty($user->pais_id)) {
198 $this->view->states = Provincias::find(['conditions' => 'pais_id = ' . Country::ESPANA, 'order' => 'provincia']);
199 } else {
200 $this->view->states = Provincias::find(['conditions' => 'pais_id = ' . $user->pais_id, 'order' => 'provincia']);
201 }
202 $this->view->genders = Genders::findMin();
203
204 $this->view->user = $user;
205 $this->view->errors = $errors;
206 }
207
208}
#1 Actiage\Front\Controller\Appointment\AppointmentsViewGetController->viewAction
#2 Phalcon\Dispatcher\AbstractDispatcher->callActionMethod
#4 Phalcon\Mvc\Application->handleapp
/var/www/html/actiage/releases/20260914094743/public/index.php : 88
1<?php
2use Phalcon\Di\FactoryDefault;
3use Phalcon\Logger\AbstractLogger;
4use Phalcon\Logger\Adapter\Stream;
5use Phalcon\Logger\Logger;
6use Phalcon\Mvc\Application;
7use Phalcon\Support\Debug;
8
9$debug = new Debug();
10$debug->listen();
11
12define('BASE_PATH', dirname(__DIR__));
13define('APP_PATH', BASE_PATH . '/src');
14
15/**
16 * The FactoryDefault Dependency Injector automatically registers
17 * the services that provide a full stack framework.
18 */
19$di = new FactoryDefault();
20
21/**
22 * Entornos de desarrollo disponibles y variables de entorno
23 */
24require_once APP_PATH . '/config/environment.php';
25
26if (ENVIRONMENT == 'development') {
27 ini_set('display_errors', 1);
28 error_reporting(E_ALL);
29}
30
31/**
32 * Información listas en klaviyo
33 */
34require_once APP_PATH . '/config/klaviyo.php';
35
36/**
37 * Read services
38 */
39require_once APP_PATH . '/config/services.php';
40
41/**
42 * Handle routes
43 */
44require_once APP_PATH . '/config/router.php';
45
46/**
47 * Get config service for use in inline setup below
48 */
49$config = $di->get('config');
50
51/**
52 * Include Autoloader
53 */
54require_once APP_PATH . '/config/loader.php';
55
56
57/**
58 * Handle the request
59 */
60$application = new Application($di);
61
62$application->registerModules(
63 [
64 'admin' => [
65 'className' => Actiage\Admin\Module::class,
66 'path' => '../src/admin/Module.php',
67 ],
68 'doctor' => [
69 'className' => Actiage\Doctor\Module::class,
70 'path' => '../src/doctor/Module.php',
71 ],
72 'sponsor' => [
73 'className' => Actiage\Sponsor\Module::class,
74 'path' => '../src/sponsor/Module.php',
75 ],
76 'user' => [
77 'className' => Actiage\User\Module::class,
78 'path' => '../src/user/Module.php',
79 ],
80 'front' => [
81 'className' => Actiage\Front\Module::class,
82 'path' => '../src/front/Module.php',
83 ]
84 ]
85);
86 try {
87 if(ENVIRONMENT != DEVELOPMENT) {
88 echo str_replace(['\n', '\r', '\t'], '', $application->handle($_SERVER['REQUEST_URI'])->getContent());
89 } else {
90 echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
91 }
92 } catch (\Exception $e) {
93 $debugFile = new Stream(BASE_PATH . '/tmp/logs/error.log');
94
95 $message = get_class($e) . ': ' . $e->getMessage() . '\n' . ' File=' . $e->getFile() . '\n' . ' Line=' . $e->getLine() . '\n' . $e->getTraceAsString() . '\n';
96 $message .= $_SERVER['REQUEST_URI'] . '\n';
97 $logger = new Logger('errorLog', ['main' => $debugFile]);
98 $logger->log(AbstractLogger::CRITICAL,$message);
99 $debugFile->close();
100}
101
KeyValue
_url/consultas-medicas-antienvejecimiento/antienvejecimiento-united-states
KeyValue
USERnginx
HOME/var/lib/nginx
HTTP_HOSTactiage.es
HTTP_ACCEPT_ENCODINGgzip, br, zstd, deflate
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT*/*
REDIRECT_STATUS200
SERVER_NAMEactiage.es
SERVER_PORT443
SERVER_ADDR51.255.77.229
REMOTE_PORT28362
REMOTE_ADDR216.73.216.244
SERVER_SOFTWAREnginx/1.20.1
GATEWAY_INTERFACECGI/1.1
HTTPSon
REQUEST_SCHEMEhttps
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/var/www/html/actiage/current/public
DOCUMENT_URI/index.php
REQUEST_URI/consultas-medicas-antienvejecimiento/antienvejecimiento-united-states
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING_url=/consultas-medicas-antienvejecimiento/antienvejecimiento-united-states&
SCRIPT_FILENAME/var/www/html/actiage/current/public/index.php
APPLICATION_ENVproduction
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1789387195.9799
REQUEST_TIME1789387195
#Path
0/var/www/html/actiage/releases/20260914094743/public/index.php
1/var/www/html/actiage/shared/src/config/environment.php
2/var/www/html/actiage/shared/src/config/klaviyo.php
3/var/www/html/actiage/releases/20260914094743/src/config/services.php
4/var/www/html/actiage/releases/20260914094743/src/config/router.php
5/var/www/html/actiage/releases/20260914094743/src/front/router.php
6/var/www/html/actiage/releases/20260914094743/src/admin/router.php
7/var/www/html/actiage/releases/20260914094743/src/doctor/router.php
8/var/www/html/actiage/releases/20260914094743/src/user/router.php
9/var/www/html/actiage/releases/20260914094743/src/sponsor/router.php
10/var/www/html/actiage/shared/src/config/config.php
11/var/www/html/actiage/releases/20260914094743/src/config/images.php
12/var/www/html/actiage/releases/20260914094743/src/config/loader.php
13/var/www/html/actiage/releases/20260914094743/vendor/autoload.php
14/var/www/html/actiage/releases/20260914094743/vendor/composer/autoload_real.php
15/var/www/html/actiage/releases/20260914094743/vendor/composer/platform_check.php
16/var/www/html/actiage/releases/20260914094743/vendor/composer/ClassLoader.php
17/var/www/html/actiage/releases/20260914094743/vendor/composer/autoload_static.php
18/var/www/html/actiage/releases/20260914094743/vendor/symfony/deprecation-contracts/function.php
19/var/www/html/actiage/releases/20260914094743/vendor/cakephp/core/functions.php
20/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-ctype/bootstrap.php
21/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-ctype/bootstrap80.php
22/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-mbstring/bootstrap.php
23/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-mbstring/bootstrap80.php
24/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-php80/bootstrap.php
25/var/www/html/actiage/releases/20260914094743/vendor/ralouphie/getallheaders/src/getallheaders.php
26/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-intl-grapheme/bootstrap.php
27/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-intl-grapheme/bootstrap80.php
28/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-intl-normalizer/bootstrap.php
29/var/www/html/actiage/releases/20260914094743/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
30/var/www/html/actiage/releases/20260914094743/vendor/symfony/string/Resources/functions.php
31/var/www/html/actiage/releases/20260914094743/vendor/cakephp/utility/bootstrap.php
32/var/www/html/actiage/releases/20260914094743/vendor/cakephp/utility/Inflector.php
33/var/www/html/actiage/releases/20260914094743/vendor/guzzlehttp/guzzle/src/functions_include.php
34/var/www/html/actiage/releases/20260914094743/vendor/guzzlehttp/guzzle/src/functions.php
35/var/www/html/actiage/releases/20260914094743/vendor/digitalbazaar/json-ld/jsonld.php
36/var/www/html/actiage/releases/20260914094743/vendor/ezyang/htmlpurifier/library/HTMLPurifier.composer.php
37/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/_bootstrap.php
38/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/all.php
39/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/any.php
40/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/apply.php
41/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/assoc.php
42/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/butlast.php
43/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/complement.php
44/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/compose.php
45/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/constant.php
46/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/dissoc.php
47/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/do_if.php
48/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/each.php
49/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/filter.php
50/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/filter_fresh.php
51/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/filter_null.php
52/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/first.php
53/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/flat_map.php
54/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/flatten.php
55/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/get.php
56/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/get_each.php
57/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/get_in.php
58/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/group_by.php
59/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/key.php
60/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/identity.php
61/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/instance_of.php
62/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/last.php
63/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/map.php
64/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/memoize.php
65/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/not.php
66/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/partial.php
67/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/partition.php
68/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/pipe.php
69/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/reduce.php
70/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/reindex.php
71/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/repeat.php
72/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/rest.php
73/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/reverse.php
74/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/search.php
75/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/some.php
76/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/sort.php
77/var/www/html/actiage/releases/20260914094743/vendor/lambdish/phunctional/src/to_array.php
78/var/www/html/actiage/releases/20260914094743/vendor/ramsey/uuid/src/functions.php
79/var/www/html/actiage/releases/20260914094743/vendor/stripe/stripe-php/lib/version_check.php
80/var/www/html/actiage/releases/20260914094743/src/front/Module.php
81/var/www/html/actiage/releases/20260914094743/src/front/Controller/Appointment/AppointmentsViewGetController.php
82/var/www/html/actiage/releases/20260914094743/src/front/Controller/BaseController.php
83/var/www/html/actiage/releases/20260914094743/src/Shared/plugins/TimeZonePlugin.php
84/var/www/html/actiage/releases/20260914094743/src/middleware/MiddleWareView.php
85/var/www/html/actiage/releases/20260914094743/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php
86/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Device.php
87/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Cookie.php
88/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Country.php
89/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Ip.php
90/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Slug.php
91/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Currency.php
92/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Bot.php
93/var/www/html/actiage/releases/20260914094743/src/Shared/plugins/RobotsPlugin.php
94/var/www/html/actiage/releases/20260914094743/src/Shared/plugins/RedisPlugin.php
95/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Image.php
96/var/www/html/actiage/releases/20260914094743/src/Shared/plugins/JsPlugin.php
97/var/www/html/actiage/releases/20260914094743/vendor/matthiasmullie/minify/src/JS.php
98/var/www/html/actiage/releases/20260914094743/vendor/matthiasmullie/minify/src/Minify.php
99/var/www/html/actiage/releases/20260914094743/src/Shared/plugins/CssPlugin.php
100/var/www/html/actiage/releases/20260914094743/src/Shared/library/User/UserRole.php
101/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/MenuNav.php
102/var/www/html/actiage/releases/20260914094743/src/Shared/models/Provincias.php
103/var/www/html/actiage/releases/20260914094743/src/Shared/models/ModelBase.php
104/var/www/html/actiage/releases/20260914094743/src/Shared/plugins/SeoPlugin.php
105/var/www/html/actiage/releases/20260914094743/src/Shared/models/SemaforoCritical.php
106/var/www/html/actiage/releases/20260914094743/src/Shared/Infrastructure/Modules/ConsultsAppointments/ConsultsAppointmentsGetBySlug.php
107/var/www/html/actiage/releases/20260914094743/src/Shared/models/ConsultasCitas.php
108/var/www/html/actiage/releases/20260914094743/src/Shared/models/ConsultasCitasSesiones.php
109/var/www/html/actiage/releases/20260914094743/src/Shared/library/Utils/Language.php
Memory usage (real)
4.0 MB
Peak usage
4.0 MB